erickcortorreal / hapi-typescript-example

:zap: Hapi.Js + Typescript = Awesomeness

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NodeJS-Hapi TypeScript Scaffolding

A NodeJS + HapiJS(17) with Typescript Starter kit to build standard projects.

Installation

  • npm run setup (install nuget packages & typings)

Important Note

  • If working with NodeJS 10.0.0, Kindly delete the package.lock.json file then try npm install

Run

  • gulp build (build ts files)
  • gulp test (run mocha tests)
  • gulp tslint (run tslint)
  • gulp watch (watch ts files)
  • npm run start (start the application)
  • npm run watch (restart the application when files change)

Features

  • Project Structure - Feature oriented
  • Hapijs - REST Api
  • Swagger - documentation
  • Jwt - authentication
  • Mongoose - MongoDb
  • nconf - configurations
  • Logging - MongoDB collection based logging
  • Unit Tests - chai + sinon + mocha

Running on port 5000 ex: localhost:5000/docs

Have fun :)

About

:zap: Hapi.Js + Typescript = Awesomeness

License:MIT License


Languages

Language:TypeScript 94.5%Language:JavaScript 4.3%Language:Dockerfile 1.1%