- Clone the project on your local.
- Execute
npm insall
on the same path as of your root directory of the clonned / downloaded project. - Create a
.env
file in the root diretory and add the following environment variables.PORT = 3000
- Inside the
src/config
folder create a new fileconfig.json
and then add the following piece of json
{
"development": {
"username": "<YOUR_DB_USERNAME>",
"password": "<YOUR_BD_PASSWORD>",
"database": "Flights_Search_DB",
"host": "127.0.0.1",
"dialect": "mysql"
}
}
- Once you've added your db configuration as listed above, go to the src folder from your terminal and execute
npx sequelize db:create
and then executenpx sequelize db:migrate
-
Flight
-
City
-
Airport
-
Airplane Table
-
A flight belongs to an airplane bbut one airplane can be used in multiple flights
-
A city has many airport but one airport belongs to a city
-
One airport can have many flights, but a flight belongs to one airport.
-
- City has many Airports and Airport belongs to a city (one to many)