Giter VIP home page Giter VIP logo

hapi-skel's Introduction

Hapi.js application skeleton

This repo has not intent to be a framework, this is just a proposed structure of an app with Hapi.js.

Folder structure

  • models
  • routes
  • contollers
  • validators
  • plugins
  • test
  • docs

Integration with Hapi.js plugins

  • Swagger plugin
  • Good console reporter plugin
  • TV plugin
  • Lab testing plugin
  • Joi Validator plugin

NPM scripts

  • 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

Environment Variables and default values

  • 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

Other Notes

  • 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

hapi-skel's People

Contributors

edersohe avatar

Stargazers

Jaehoon Jung avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.