Coder Social home page Coder Social logo

mohammed-nasif / storefront-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 123 KB

Udacity - Build Storefront Backend Project Number Two For Advanced Full-Stack Web Development Nanodegree Program.

JavaScript 15.75% TypeScript 84.25%
bcrypt db-migration db-schema dotenv expressjs hashing jasmine jsonwebtoken jwt-authentication nodejs

storefront-backend's Introduction

Udacity - Storefront Backend

Version 1.0.0

This project aims to Build a Storefront Backend With the use of the following libraries [TypeScript, Postgres Database, Node/ExpressJS, dotenv, Jasmine Unit Test, Supertest, bcrypt for hashing Password, db-migrate, jsonwebtoken].This project barely touches the surface of what is possible but will prove your ability to use what you’ve learned in real-world scenarios.


Table of Contents


Instructions

(Back to top)

Database Setup

in your CMD run the Following:

  • psql -U postgres
  • CREATE USER nasif_udacity WITH PASSWORD 'nasif123';
  • [Create Main DB] CREATE DATABASE nasif_store;
  • [Create Test DB] CREATE DATABASE nasif_store_test;
  • GRANT ALL PRIVILEGES ON DATABASE nasif_store TO nasif_udacity;
  • GRANT ALL PRIVILEGES ON DATABASE nasif_store_test TO nasif_udacity;

Ports: The Database running Port: 5432 The Store Backend running Port: 3020


Installation

(Back to top)

You can Install this project to your PC using clone the repo to your github account then Download It as a ZIP File to your PC.

or Clone it using GIT git clone if you access it from GITHUB.


Usage

(Back to top)

  • After The Installation you can now use the project files by UnZip the file and open it on any Code Text Editor (VS Code).

  • You Must First install packages (dependencies): open Project-File in terminal and npm i.

  • Then npm run start to start the server.


Development

(Back to top)

The Project Contains :

build

migrations

node_modules (Or .gitignore.txt)

spec

src

.env (deleted on GITHUB)

database.json

package.json

package-lock.json

README.md

REQUIREMENTS.md

tsconfig.json

Each file contains it's modifications and comment above each step of modify.

Don't make any modifications on Package.json or node_modules Folder.

Scripts

  • Install The Pacakges if node_module File not attached: npm i
  • Run unit tests with Jasmine: npm run test-Win for Windows or npm run test-Mac for Mac
  • Start server: npm run start

create .env file (IF you Access This Project From GITHUB):

• PORT=3020 • ENV=dev • POSTGRES_HOST=localhost • POSTGRES_PORT=DB_Port • POSTGRES_DB=DB_Name • POSTGRES_DB_TEST=Test_DB_Name • POSTGRES_USER=yourUN • POSTGRES_PASSWORD=yourPass • BCRYPT_PASSWORD = user-secret-password • SALT_ROUND=10 • TOKEN_SECRET=user-secret-token

Contribute

(Back to top)

- Udacity

- EgFwd


License & Copyright

(Back to top)

© Udacity And Mohammed Nasif.

storefront-backend's People

Contributors

mohammed-nasif avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.