This repo has not intent to be a framework, this is just a proposed structure of an app with Hapi.js.
- models
- routes
- contollers
- validators
- plugins
- test
- docs
- Swagger plugin
- Good console reporter plugin
- TV plugin
- Lab testing plugin
- Joi Validator plugin
- run:
npm start
- testing:
npm test
- code coverage:
npm run coverage
- check deps:
npm run deps
- check outdated deps:
npm run outdated
- code linting:
npm run lint
PORT=3000
GOOD_CONSOLE=log,response,request,error
SWAGGER_URI=http://localhost:3000
NODE_ENV=development
TV_DEBUG=1
(0 disable plugin)LOG_LEVEL=INFO
config.js
just initialize variables with env vars if these exist or default values if not exists- Code linting is done by JSHint and right now just has the basic configuration into
.jshintrc
- Git exclude javascript IDE's, Node and OSX auto-generated files and are mostly not desirables in your repo, check ``.gitignore` is generated by https://goel.io/joe
npm start
load the index.js with PM2 module and is mostly used on production environment if you are on development stage just hit:node index.js