Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vinamrasaurav/flightsandsearchservice
https://github.com/vinamrasaurav/flightsandsearchservice
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/vinamrasaurav/flightsandsearchservice
- Owner: VinamraSaurav
- Created: 2024-06-18T20:27:16.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-06-25T02:55:33.000Z (7 months ago)
- Last Synced: 2024-06-25T13:56:12.300Z (7 months ago)
- Language: JavaScript
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to Flights Service
## Project Setup
- Clone the project on your local
- Execute `npm install` on the same path as of your root directory of the downloaded project.
- Create a `.env` file in the root directory and add the following environment variable
- `PORT = 3000`
- `DB_SYNC = true` (Required only once after setting up associations, once done can change it to false).
- Inside the src/config folder create a new file `config.json` and then add the following piece of json in it.
```
{"development": {
"username": ,
"password": ,
"database": "Flights_Search_DB_Dev",
"host": "127.0.0.1",
"dialect": "mysql"
},
}
```
- Once you have added you db config as listed above, go to the src folder from your terminal and execute `npx sequelize db:create` and then execute `npx sequelize db:migrate`.## Tables
- City - id, name, updatedAt, createdAt
- Airport - id, name, address, cityId, updatedAt, createdAt
- Relationship - City has multiple airports and Airport belongs to a city. (one to many relationship).- Airplane - id, modleName, capacity, updatedAt, createdAt
- Flights - id, flightName, airplaneId, arrivalAirportId, departureAirportId, arrivalTime, departureTime, totalSeats, price, boardingGate, createdAt, updatedAt.