- Make sure you have Node.js and PostgreSQL installed on your computer, If you don't have Postgres installed locally, you can use cloud database service such as https://www.elephantsql.com/ to create the databases
- Clone this repository using the command :
git clone - Navigate to the project directory using the command
cd commerce-app-champions-bn - Install dependencies by running :
npm install - Create a PostgreSQL database and update the
config/config.jsfile with your database credentials. - Run the database migrations using Sequelize by running the following command:
npm run migrate:up - Start the application by running:
npm run dev
Before running the application using docker , make sure to set the following environment variables:
- DB_HOST: Must be set to 'db'
- DB_USERNAME: The username for your PostgreSQL database
- DB_PASSWORD: The password for your PostgreSQL database
- DB_NAME: The name of your PostgreSQL database
- PORT: The port number that the application will run on
- EMAIL: [email protected]
- EMAIL_PASSWORD: Workhard
Note: DB_USERNAME and DB_NAME must be the same.
1.Make sure you have docker installed.
-
Clone this repository using the command :
git clone -
Navigate to the project directory using the command
cd commerce-app-champions-bnand open it with your editor mostly vscode. -
Navigate to the docker branch by running :
git checkout ch-setup-dockerin the terminal -
Install dependencies by running :
npm installin the terminal and configure your environment variables. -
Run the this script :
npm run docker:compose:upto run build of images and containers but make sure that docker is running. -
Run this script to stop and delete containers:
npm run docker:compose:down -
You can also run :
npm run docker:compose:buildfor building but it is 'optional'.