- Go inside the folder path and execute the following command:
npm install
-In the root directory create a .env file and add the following env variables
PORT = <port number of your choice>
ex:
PORT=3000
-go inside the src folder and execute the following command:
npx sequelize init
-By executing the above command you will get migrations and seeders folders along with a config.json inside the config folder.
-If you are setting up your development environment, then write the username of your db , password of your db and in dialect mention whatever db you are using for ex:mysql , mariadb etc -If you're setting up test or prod environment, make sure you also replace host with the hosted db url.
-To run the server execute
npm run dev