Skip to content

ShellyXueHan/craft-bar

Repository files navigation

Website for Craft Bar

Features:

  • Website is hosted here
    • CRUD of beers
    • Employee login/logout (could try:
      • username: Boss
      • password: 123456 )
    • Mobile friendly
  • Backend, testing, frontend
  • Agile approach

Technical details:

Backend:

  • Express
  • Node.js
  • Knex with postgres
  • Heroku cloud platform
  • JWT (login session token cookie)


Unit Testing:

  • Jest
  • Supertest


Functional Testing:

Frontend (minimal work):

  • Handlebars
  • Boostrap (support mobile view)

Agile strategy:


Installation steps:

Development (localhost):

npm install

install node dependencies

createdb craft-bar-dev |

setup database

knex migrate:latest | knex seed:run

database setup

psql craft-bar-dev | select * from beers;

check database with populated data

nodemon

run the app and access it at localhost:3000


Test:

npm run lint

pre-test: lint check the formatting accoring to facebook style, set in .eslintrc.js file

npm run test

this will execute the jest test, there are 5 unit test cases. details


Production:

npm run pre-deploy

change the environment to deployment so that database connection will work

heroku login

use Heroku for could platform hosting

heroku config & heroku apps

check Heroku setup and make sure there is Heroku Postgres db

heroku run knex migrate:latest

heroku run knex seed:run

setup prod database

git push heroku master

push the project to Heroku and deploy


Reference:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published