Backend for a train reservation System using FastAPI and MySQL
APACHE-2.0 License
- 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:
db
and run each .sql file starting from railway_system, views, triggers, data.MYSQL_DATABASE = "<your mysql db>" MYSQL_USER = "<your mysql user>" MYSQL_ROOT_PASSWORD = "<your mysql password>"
- 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