generator-herman-express

0.0.5 • Public • Published

Herman Express Generator

npm version

Just a Node/Express Yeoman generator for a basic Node/Express boilerplate, featuring:

  1. A component-based structure (example)
  2. Server-side Templating via Nunjucks
  3. Local Auth via Passport
  4. Knex query builder
  5. Flash Messages
  6. Tests
    • Unit
    • Integration
    • Memory Leaks (use with helper functions) via leakage
    • Istanbul for code coverage
  7. Airbnb JavaScript Linter
  8. Security

Getting Started

  1. Install Yeoman (if necessary) - npm install -g yo
  2. Install Gulp (if necessary) - npm install -g gulp
  3. Install the generator - npm install -g generator-herman-express
  4. Run - yo herman-express, go through all prompts, and then npm install
  5. Create the necessary databases
  6. Update the variables in .env
  7. Create the development and test Postgres DBs:
  8. Run development migrations:
    • knex migrate:latest --env development
  9. Run seed:
    • knex seed:run --env development
  10. Run server
    • gulp

Test

All tests:

$ npm test

Leakage tests:

$ npm run leaks

Coverage:

$ npm run coverage
$ npm run coverage-unit
$ npm run coverage-integration

New Component?

Steps for setting up a new component:

  1. Add a new component directory to "src/server/components"
  2. Add the route to src/server/routes.js
  3. Add the new views to the viewFolders array in src/server/config/main-config.js
  4. Add tests

Readme

Keywords

Package Sidebar

Install

npm i generator-herman-express

Weekly Downloads

4

Version

0.0.5

License

MIT

Last publish

Collaborators

  • mjhea0