Giter VIP home page Giter VIP logo

udacity-storefront-nodejs's Introduction

storeFront_udicity_node_project

Database

-database is running on default port 5432.
-you must create two databse one for test and the second for use.
-make sure that if you change name of database that you must change it in database.json and .env

  • to create database CREATE DATABSE storeFront ;
  • to create second database CREATE DATABSE storeFront_test ;
  • config .env and put data about database and all missing data like this :
    -POSTGRES_HOST=127.0.0.1
    -POSTGRES_DB=storefront
    -POSTGRES_TEST_DB=storefront_test
    -POSTGRES_USER=### <- write your user here
    -POSTGRES_PASSWORD=### <- write your password here
    -ENV=dev
    -BCRYPT_PASSWORD=### <- write text that will join to encrypt password
    -SALT_ROUNDS=10
    -TOKEN_SECRET=### <- write text that will join to encrypt token

Server

-The server will listen on port 3000:
-to run server successfull

  • run in terminal npm install to install all packages
  • make sure that you do the database steps and server of database is run in correct port and you create the two databases
  • run server in terminal by npm run server

Test

-To run test you write in the terminal npm run test

  • focus that npm run test include inside it npm run build && npm run jasmine so you can run test immediately without run npm run build

Global package

  • some of package in node_modules you need to install it global to run project without errors like:-
  • npm install -g jasmine
  • npm install -g jasmine-ts
  • npm install -g @types/jasmine
  • npm install -g @dotenv
  • npm install -g db-migrate
  • npm install -g db-migrate-pg
  • npm install -g ts-node

Scripts

  • Install: npm install
  • watch: npm run watch',
  • test : npm run test,
  • db-migrate up: npm run db-up,
  • db-migrate down: npm run db-down,
  • Prettify: npm run prettify,
  • Start server: npm run server,
  • build: npm run build,
  • jasmine: npm run jasmine

udacity-storefront-nodejs's People

Contributors

alitaarek avatar

Watchers

James Cloos 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.