@formysister love hapi.js. If you haven't used this beautiful, scalable and carefully crafted framework for real world application, you should check it out!
This is our official starter kit which has been tested in our production and passed all the scalability, performance and reliability expectations.
Clone this repo.
git clone https://github.com/formysister/typescript-hapi-boilerplate.git`
install dependencies
npm install
To run locally for development
npm run dev
To build a bundled transpiled javascript app
npm run build
You should see the output in your terminal:
# npm run dev
> [email protected] dev /Users/alex/Documents/projects/typescript-hapi-boilerplate
> nodemon
[nodemon] 2.0.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): src/**/* main.ts
[nodemon] watching extensions: ts
[nodemon] starting `ts-node ./main.ts`
Server running at: http://mypc.local:3000
npm t
Running tests in watch mode along with coverage
npm run test:watch
OR without coverage
npm run test -- --watch
Build the bundle: leveraging webpack, we can compile our code and bundle it together so you no longer need to maintain dependencies in production environment.
npm run bundle
Above script will produce dist
folder that contains your compiled application. you can now simply node ./dist/main.js
or use pm2
as your process manager pm2 start ./dist/main.js
For a devOps, you cannot ignore the contributions made by Docker to bring inner peace in their lives.
TODO: Docker deployment guide
In progress.
- Stop being lazy and move the kit to opensource.
- Configure basic structure
-
Typescript
-
@Hapi/hapi
v19 -
Webpack
-
Jest
configuration - LICENSE
- Folder structure
-
supertest
integration - Write example test with
jest
andsupertest
- Write Dockerfile
- Write docker-compose.yml file
- Write
FAQ
- Write
Features
- Configure
TravisCI
TODO: Features In progress.
TODO: FAQ In progress.
Use any of the following medium for support:
- Raise a ticket on github
- Reach me on my email (in package.json)
- Reach me on my linkedin.
- Reach on portfolio website and ask for me on chat(Shold be used as rarely as possible!)