Giter Club home page Giter Club logo

hapi-boilerplate's Introduction

Hapi Boilerplate

A Hapi boilerplate with Sequelize, Sequelize-CLI and node-config

Cool features in this boilerplate:

  • It's modular. Define your routes, plugins, models and controllers separately.
  • Uses node-config. Define all your configuration properties hierarchically and according to your environment.
  • Models/ORM through Sequelize and Sequelize-cli with common configuration! Supports migrations. Read more about sequelize and Sequelize-cli.

Directory structure

The structure of the boilerplate and explanation follows:

hapi-boilerplate
├── app.js                  # Application entry point run with "node app"
├── config
│   ├── default.json        # common config for all environments
│   ├── development.json    # config for development environments
│   ├── production.json     # config for production environments
├── controllers
│   ├── index.js            # file that requires all controllers into a hash
│   └── users.js            # an example controller. use it for inspiration.
├── migrations              # migrations directory with an example migration. generated with "sequelize-cli"
│   └── 20141021121205-create-user.js
├── models
│   ├── index.js            # generated with "sequelize init". requires all models.
│   └── user.js             # an example model. generated with "sequelize-cli model:create"
├── package.json
├── plugins
│   └── index.js            # register plugins. add your custom plugins in this folder as well.
├── README.md
└── routes.js               # define all the routes in this file.

Usage

Just clone the repository:

$ git clone https://github.com/miguelcobain/hapi-boilerplate.git

run

$ npm install

and start coding.

To run the application run node app.

hapi-boilerplate's People

Contributors

debugger24 avatar miguelcobain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hapi-boilerplate's Issues

Error with migration

Hello,
I modified the infos in the config files but when I try to sequelize db:migrate, I get

Unknown arguments: username, password, database, host, dialect

What's wrong?

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.