- Clone the repository
- Install packages by running
npm install
- Create
.env
in project root directory - Take a look at the
.env.example
file which is in the project root directory to have a clue on environment variables that are being used in this project - Copy all keys from the
.env.example
file to.env
file and add values to corresponding keys. These can be obtained from the project administrator
-
Configuring
.env
- Download and install pgAdmin
- Create two databases, one for testing and another for development.
- Copy
DATABASE_DEV_URL=postgres://your_db_user:[email protected]:5432/your_dev_db_name
andDATABASE_TEST_URL=postgres://your_db_user:[email protected]:5432/your_test_db_name
URLs from.env.example
to.env
- Edit them with your real database user, password and database name.
-
Running Migrations
- Run
npm run migrateDB
in terminal to fire up migration
- Run
-
To Undo Migrations
- Run
npm run migrate:reset
to undo all migrations
- Run
-
Running Seeds
- Run
npm run seeding
to seed all
- Run
- Run
npm run dev
to run server local
- Run
npm test
to run tests