Backend for IRCTC APP . This backend was used to maintain, secure and give access to the database through RestAPI calls.
- checkout to dev branch
- git clone <url>
- pip install virtualenv
- cd backend
- virtualenv venv
- venv\Scripts\activate (windows)
- source venv/bin/activate (UNIX systems)
- pip install -r requirements.txt
You need a mysql server running on your machine. Therefore, make sure you have an instance of mysql running. Furthermore, you now need to create the railway_system
database, you can name it as per your wishes. After this, follow the steps:
- Go to
db
and run each .sql file starting from railway_system, views, triggers, data. - Create .env file and fill the parameters accordingly. It should look like this
MYSQL_DATABASE = "<your mysql db>" MYSQL_USER = "<your mysql user>" MYSQL_ROOT_PASSWORD = "<your mysql password>"
Now you will be able to acess the database.
- uvicorn main:app --reload
- open http://localhost:8000/docs
- open http://localhost:8000/docs
- git pull
- venv\Scripts\activate (windows)
- source venv/bin/activate (UNIX systems)
- pip install -r requirements.txt
- open http://localhost:8000/docs
- alternatively http://localhost:8000/redoc