AbdelrahmanTolba / Storefront-Backend

This is a backend API build in Nodejs for an online store. It exposes a RESTful API that will be used by the frontend developer on the frontend.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Storefront Backend Project

This project is part of the Udacity Backend Javascript Nanodegree

Build with

Getting Started

Create .env file in the root directory

    PORT=3000
    ENV=dev

    POSTGRES_HOST=127.0.0.1
    POSTGRES_PORT=5432
    POSTGRES_USER=storefront_user
    POSTGRES_DB=storefront_db
    POSTGRES_DB_TEST=storefront_db_test
    POSTGRES_PASSWORD=password123
    
    BCRYPT_PASSWORD=breaking-bad-1234
    SALT_ROUNDS=10
    TOKEN_SECRET=hello-from-token-secret

Setup

This is an list of needed instructions to set up your project locally, to get a local copy up and running follow these instructuins.

Scripts

Prettier

  npm run prettier

Lint

  npm run lint

Start server

  npm run start

Start server & tests

  npm run test

Run Locally

  1. Clone the repository
$ git clone [https://github.com/AbdelrahmanTolba/Storefront-Backend.git]
  1. Navigate to repository directory
$ cd Storefront-Backend
  1. Install dependencies
$ npm install
  1. Create 2 databases
CREATE DATABASE storefront_db;
CREATE DATABSE  storefront_db_test; 
  1. Running on development mode
$ npm run start
  1. Running Tests
$ npm run test

About

This is a backend API build in Nodejs for an online store. It exposes a RESTful API that will be used by the frontend developer on the frontend.


Languages

Language:TypeScript 89.9%Language:JavaScript 10.1%