Code Monkey home page Code Monkey logo

storefront-backend-udacity's Introduction

Storefront Backend Project

creating the database

  • create a database and name it shopping for the dev via the sql CREATE DATABASE shopping;
  • create a database and name it shopping_test for the testing CREATE DATABASE shopping_test

create user

  • create user and name him shopping_user you want but don't forget to put it in the .env file via the sql CREATE USER shopping_user WITH PASSWORD 'password123'

  • grant all access to that user via the sql GRANT ALL PRIVILEGES ON DATABASE shopping TO shopping_user

  • grant all access to that user via the sql GRANT ALL PRIVILEGES ON DATABASE shopping_test TO shopping_user

create a .env file and copy and paste all with changing the ##

ENV=dev

db_host=localhost
db_name=shopping
db_test=shopping_test
db_user=shopping_user
db_password=password123

BCRYPT_PASSWORD=##

SAULT_SHOTS=10

TOKEN=##

the database.json should be good to go but you can edit it if you want

{
    "dev": {
      "driver": "pg",
      "host": {"ENV": "db_host"},
      "database": {"ENV": "db_name"},
      "port": {"ENV": "port"},
      "user": {"ENV": "db_user"},
      "password": {"ENV": "db_password"}
    },
    "test": {
      "driver": "pg",
      "host": {"ENV": "db_host"},
      "database": {"ENV": "db_test"},
      "port": {"ENV": "port"},
      "user": {"ENV": "db_user"},
      "password": {"ENV": "db_password"}
    }
  }
  

Set up

  • npm install to install all dependencies
  • npm run db:up to set up the database and get access the app
  • npm run build to build the app

app ports

  • database port 5432

  • app port 3000

Start the app

  • npm run start to start the app

Test the app

  • npm run test to test the app

storefront-backend-udacity's People

Contributors

markdoha 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.