Skip to content

An API that mimics the functionalities of an online store

Notifications You must be signed in to change notification settings

MuhamedMagdi/StorefrontAPI

Repository files navigation

StoreFront API

Table of contents


Installation

  • After cloning the repo open the folder in the terminal and run the following command to install all packages
npm i
  • Rename .env.example to .env

Database Configurations

  • Open psql terminal.
  • Create user
CREATE USER fwd WITH PASSWORD 'fwd' SUPERUSER;
  • Create A Database
CREATE DATABASE store OWNER fwd ENCODING UTF8;
  • Crate testing database
CREATE DATABASE store_test OWNER fwd ENCODING UTF8;
  • The database is running on host localhost and port 5432

Server Configurations

  • The server is running on port 3000
  • Bcrypt paper is secret and rounds = 8
  • JWT secret = JWTSECRET

Scripts

  • Build the project from TypeScript to JavaScript and save it to /build
npm run build
  • Starting the final build of the project
npm run start
  • Running the TypeScript server in development with nodemon
npm run dev
  • Getting linting errors using eslint
npm run lint
  • Fixing linting errors using eslint
npm run lint:fix
  • Formatting the project using prettier
npm run format
  • Run migrations of the database
npm run db:up
  • Reset the database
npm run db:down
  • Building the project and testing the specs on a test database
npm run test

About

An API that mimics the functionalities of an online store

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published