0.0.5 • Published 9 years ago
generator-herman-express v0.0.5
Herman Express Generator
Just a Node/Express Yeoman generator for a basic Node/Express boilerplate, featuring:
- A component-based structure (example)
- Server-side Templating via Nunjucks
- Local Auth via Passport
- Knex query builder
- Flash Messages
- Tests
- Airbnb JavaScript Linter
- Security
Getting Started
- Install Yeoman (if necessary) -
npm install -g yo - Install Gulp (if necessary) -
npm install -g gulp - Install the generator -
npm install -g generator-herman-express - Run -
yo herman-express, go through all prompts, and thennpm install - Create the necessary databases
- Update the variables in .env
- Create the development and test Postgres DBs:
- Run development migrations:
knex migrate:latest --env development
- Run seed:
knex seed:run --env development
- Run server
gulp
Test
All tests:
$ npm testLeakage tests:
$ npm run leaksCoverage:
$ npm run coverage
$ npm run coverage-unit
$ npm run coverage-integrationNew Component?
Steps for setting up a new component:
- Add a new component directory to "src/server/components"
- Add the route to src/server/routes.js
- Add the new views to the
viewFoldersarray in src/server/config/main-config.js - Add tests