Giter Club home page Giter Club logo

storefront-backend's Introduction

Storefront Backend Project

Getting Started

This repo contains a Node and Express app consisting of a Storefront Backend API.

Required Technologies

Your application must make use of the following libraries:

  • Postgres for the database
  • Node/Express for the application logic
  • dotenv from npm for managing environment variables
  • db-migrate from npm for migrations
  • jsonwebtoken from npm for working with JWTs
  • jasmine from npm for testing

Installation

  • To get started, clone this repo and run npm install in your terminal at the project root.
  • To connect to a database, create a docker container, use docker compose up command. The docker container starts the database for accepting connections.
  • And use npm run create-db to create storefront database and npm run delete-db to remove storefront database.
  • To start app in dev mode, use npm start command.
  • To start app in prod mode, use npm run build command.
  • Use db-migrate up to migrate db queries.
  • For testing, use npm run test command.
  • server is running on localhost:3000.

Notes ⚠️

  • Databases used storefront for dev or prod and storefront-test for testing.
  • You need to create storefront database by running command npm run create-db.
  • No need to create database storefront-test, use npm run test will automatically create, run tests and delete db.

License

Udacity

Environment Variables (.env)

POSTGRES_HOST=127.0.0.1
POSTGRES_DB=storefront
POSTGRES_TEST_DB=storefront_test
POSTGRES_USER=praveen
POSTGRES_PASSWORD=postgres
ENV=dev
BCRYPT_PASSWORD=haha-my-friend
SALT_ROUNDS=10
TOKEN_SECRET=something

storefront-backend's People

Contributors

praveen-sripati avatar

Watchers

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