Skip to content

This project supports infrastructure to build middle plus size backend service and API system

Notifications You must be signed in to change notification settings

formysister/typescript-hapi-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👷‍♂️🚧 This project is under construction 🚧👷‍♂️

Hapi.js and typescript scaffolding

@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.

Getting started

Prerequisites

Clone this repo.

git clone https://github.com/formysister/typescript-hapi-boilerplate.git`

Installation

install dependencies

npm install

Usage

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

Running tests (using Jest)

npm t

Running tests in watch mode along with coverage

npm run test:watch

OR without coverage

npm run test -- --watch

Deployment

Deploying manually

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

Docker

For a devOps, you cannot ignore the contributions made by Docker to bring inner peace in their lives.

TODO: Docker deployment guide

In progress.

TODO

  • 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 and supertest
  • Write Dockerfile
  • Write docker-compose.yml file
  • Write FAQ
  • Write Features
  • Configure TravisCI

Features

TODO: Features In progress.

FAQ

TODO: FAQ In progress.

Support

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!)

About

This project supports infrastructure to build middle plus size backend service and API system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published