- Website is hosted here
- CRUD of beers
- Employee login/logout (could try:
- username: Boss
- password: 123456 )
- Mobile friendly
- Backend, testing, frontend
- Agile approach
- Express
- Node.js
- Knex with postgres
- Heroku cloud platform
- JWT (login session token cookie)
- Jest
- Supertest
- Details in Trello ticket
- Behaviour Driven Development Testing
- Criterion
- Automated testing: sample from previous work
- Handlebars
- Boostrap (support mobile view)
- Trello board
- TDD for API unit testing
- BDD for API design
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
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
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