Skip to content

Repository files navigation

StoreFront API

How to start the project

  • run npm i
  • run npm i db-migrate -g
  • run npm run createdatabase to create the database
  • run npm run migrate:up to create the database tables
  • add .env file to the directory
  • run npm run start:dev

ENV variables

PORT=3000
POSTGRES_DB=storefront
POSTGRES_DB_TEST=storefront_test
POSTGRES_USER=ke7el
POSTGRES_HOST=127.0.0.1
POSTGRES_PASSWORD=ke7elpass
ENV = 'dev'
SECRET = 'THISISSECRET'

Creating the database user

CREATE USER ke7el WITH PASSWORD 'ke7elpass';
GRANT ALL PRIVILEGES ON DATABASE "storefront_dev" TO ke7el;
GRANT ALL PRIVILEGES ON DATABASE "storefront_test" TO ke7el;

Ports

  • Server - 3000
  • Database - 5432

Testing

  • run npm run test

About

The first project for the udacity nanodegree and egfwd initiative by the ministry of telecommunications in Egypt.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages