Skip to content

Latest commit

 

History

History

backend

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Music Catalog Backend

This subproject uses FastAPI version 0.95.0, Uvicorn version 0.21.1, and PlanetScale. It serves as the backend API for the application, containing all the required server-side business logic.

How to Run?

Installing the Dependencies

Run the following command from this directory to install the dependencies to run the application:

pipenv install

To install the development dependencies as well, run:

pipenv install --dev

Note: This document assumes you have PipEnv installed on your system globally. If not, check out PipEnv Documentation - Install for PipEnv installation guide.

Serving the Application

Run the following command to serve the application.

pipenv run uvicorn src:app

Navigate to http://localhost:8000/api/docs to check the documentation on how to use the API.

Use the --reload flag to serve the application with a live-reload configuration meant for development purposes:

pipenv run uvicron src:app --reload

API-Documentation

As previously mentioned, you can navigate to http://localhost:8000/api/docs to check out the auto-generated documentation. You can also navigate to http://localhost:8000/api/redocs to check out the redoc format documentation as offered by the framework.

OpenAPI-Specification File

You can find the OpenAPI-Specification File at http://localhost:8000/api/openapi.json as produced by the framework.

Dependencies

The following packages are used for building this subproject:

To Contributors:

All contributions are subjected to a review before they are accepted.

Before You Contribute

Please use the install-dev.sh script provided and install the pre-commit hooks for development before making any commits or run the following commands from this directory:

pipenv install --categories "dev-hooks"
pipenv run pre-commit install

Note: This document assumes you have PipEnv and NPM installed on your system globally. If not, check out PipEnv Documentation - Install for PipEnv installation guide and NPM Documentation - Install for NPM installation guide.

Read Also

These materials may be used for better understanding the source code: