Coder Social home page Coder Social logo

storefront_backend_cgml's Introduction

Storefront Backend Project

Getting Started

This repo contains the modified start code for the storefront backend project. It consists of a basic Node and Express app, that I used to build up an API service for a real-life scenario.

To get started clone the project and execute npm i in your CLI to install all dependencies necessary to run the project. Now you can start to setup a database by following these steps: startup a PSQL terminal

  • Create a user by typing the command CREATE USER storefront_admin WITH PASSWORD storefront_password
  • Create a live database and one for testing with CREATE DATABASE storefront_backend; and CREATE DATABASE storefront_backend_test;
  • Grant all privileges to the user in both databases with GRANT ALL PRIVILEGES ON DATABASE storefront_backend; and GRANT ALL PRIVILEGES ON DATABASE storefront_backend_test;

Since the project is using the dotenv library, a .env file is needed. Below is an example of a working dotenv file based on the database name and user mentioned above. The port on localhost is set to 5678.

POSTGRES_HOST=localhost
POSTGRES_PORT=5678
POSTGRES_DB=storefront_backend
POSTGRES_DB_TEST=storefront_backend_test
POSTGRES_USER=storefront_admin
POSTGRES_PASSWORD=storefront_password
BCRYPT_PASSWORD=very_spicy_password
SALT_ROUNDS=10
TOKEN_SECRET=top-secret

storefront_backend_cgml's People

Contributors

christa-cheung avatar berkeleycole avatar uanjali avatar sudkul avatar mohassn avatar crazybee81 avatar trellixvulnteam 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.