• Stars
    star
    126
  • Rank 278,229 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸš€ Starter for building APIs with Hapi + Typescript!

TypeScript + Hapi = <3

This is a super simple starter kit to develop APIs with HapiJS + TypeScript

What currently supports?

This starter kit comes with the following features:

  • Swagger-UI
  • Status Monitor
  • .env files support
  • nodemon for hot-reload
  • Pretty Console Logger with Winston
  • Work with Yarn or NPM 6 as dependency resolvers
  • Code formatting with Prettier as hook for Pre-commit
  • Dockerfile + docker-compose for development
  • Basic Test Suite with Tape
  • Coverage Report
  • Supports Heroku Deployment
  • Supports Prettier for code formating
  • Supports commitlint via husky to have standarized commit messages

Requirements

  • NodeJS > 12.x
  • NPM > 6.x

How to use it?

  1. Download this project as a zip.
  2. Run npm install
  3. Run npm run nodemon:start
  4. Visit http://localhost:8080/documentation to view swagger docs.
  5. Visit http://localhost:8080/api/users to test the REST API.
  6. Visit http://localhost:8080/status to view the status monitor.

UPDATED: Now there's a CLI that currently support creating a new project from this repo: create-typescript-api

TODO

This is not finished, there's still a lot of things to improve. Here you got some:

  • Simple test suite - added by the help of @jcloutz
  • Add support for test coverage - added by the help of @jcloutz
  • Add GraphQL support
  • Add support for Auth with JWT or Sessions
  • Add support for TypeORM/Mongoose
  • Add support for Jenkins pipeline

Documentation

What are the package.json scripts for?

  • build-ts: Compiles typescript based on config set in tsconfig.json.
  • start: Starts node with the compiled typescript. Used by eg. Heroku.
  • docker:logs: View Docker logs
  • docker:ps: List Docker containers
  • docker:start: Start Docker container based on docker-compose.yml file.
  • docker:stop: Stop Docker container
  • nodemon:build: Starts the Nodemon using ts-node. No need to compile beforehand.
  • nodemon:start: Same as nodemon:build
  • format:lint: Runs tslint on the typescipt files, based on tslint.js settings.
  • format:prettier: Runs prettier on all ts-files.
  • postinstall: Runs build-ts script. This is used by eg. Heroku automatically.
  • test: Runs tests using nyc, and creates coverage report.

Issues

If you found a bug, or you have an answer, or whatever. Please, raise an issue.

Contributing

Of course, if you see something that you want to upgrade from this library, or a bug that needs to be solved, PRs are welcome!

License

Distributed under the MIT license. See LICENSE for more information.

More Repositories

1

material-calendar-view

πŸ“… Material Design Calendar compatible with API 11+
Java
369
star
2

react-native-mercadopago-px

πŸš€ MercadoPago PX bridge for react-native
Kotlin
100
star
3

react-qr-reader

React component for QR Scanning on web using Zxing library
TypeScript
50
star
4

mvp-helpers

♻️Helper classes to build Android Apps through MVP pattern in a faster way
Java
42
star
5

datetimepicker-edittext

πŸ“… A set of EditTexts with built-in support for Date and TimePicker's using Fragments
Kotlin
35
star
6

react-admin-extensions

Packages for improving your development workflow with react admin
TypeScript
26
star
7

styled-animation

😎 Helper that implements react-animations for styled-components
TypeScript
21
star
8

react-native-live-stories

An Instagram like component to preview and render stories with videos
TypeScript
19
star
9

ra-language-spanish

Spanish translations for React-Admin framework
JavaScript
18
star
10

react-native-mercadopago-checkout

Java
16
star
11

next-google-dfp

πŸš€ Integrate Google Double Click for Publishers in Next.js with ease
TypeScript
13
star
12

react-particles

πŸŽ‰Blazing fast ParticlesJS wrapper for ReactJS
TypeScript
13
star
13

create-env

πŸš€ Create .env files based on CI environmental values
JavaScript
11
star
14

react-slot-fill

πŸŽ‰ Slot and Fill implementation for React 16. Portals on Steroids πŸ’ͺ
TypeScript
11
star
15

mui-audio-player

πŸš€ Material-UI based Audio Player
TypeScript
10
star
16

react-native-redux-todo

πŸ“± An example todo mobile app built with react-native + redux + asyncstorage
JavaScript
10
star
17

create-typescript-api

πŸ’» CLI to generate base project to start developing APIs with TypeScript.
JavaScript
9
star
18

react-suspense-playground

πŸš€ React Suspense demo
JavaScript
9
star
19

react-snake

🐍 Snake game implemented in React
JavaScript
8
star
20

use-torch-light

πŸ”¦Hook to enable/disable the camera torchlight via Web APIs
TypeScript
7
star
21

react-native-paper-use-styles

Custom Hook to define RN StyleSheets in a dynamic way
Java
7
star
22

multer-storage-gridfs

πŸ’½ Upload your files faster to gridfs with this custom multer storage
JavaScript
6
star
23

react-final-form-helpers

React Final Form helpers is a set of libraries that will help you build Final Forms with ease
TypeScript
6
star
24

next-google-analytics

πŸš€ Integrate Google Analytics in Next.js with ease
TypeScript
6
star
25

react-link-state

[DEPRECATED] πŸš’ linkState comes to the rescue of your input event handlers!
JavaScript
6
star
26

gatsby-source-analytics-most-read-posts

πŸš€ Get your most read Posts from Google Analytics Reporting API.
JavaScript
6
star
27

react-fetch

[DEPRECATED] πŸ“ƒ High Order Component to provide data fetching capabilities through isomorphic-fetch
JavaScript
4
star
28

react-native-mercadopago-tokenize-checkout

πŸš€ MercadoPago Web Tokenize Checkout for React Native
TypeScript
4
star
29

aws-terraform

Test of an AWS Infra using Terraform
HCL
3
star
30

ra-data-simple-microservices

πŸš€ React Admin data provider with support for microservices
TypeScript
3
star
31

react-use-config

Custom Provider and Hook for managing config in React Apps
TypeScript
3
star
32

uniforms-react-native-paper

πŸ’… React Native Paper components for uniforms.
TypeScript
3
star
33

autoform-next

Next generation redux-autoform API
JavaScript
3
star
34

ui-components

This library contains the UI components that we use on our sites. These components use Material UI and are responsive to both desktop and mobile.
TypeScript
3
star
35

cra-http2-push-server

πŸš€ HTTP2 custom server for CRA projects. Boost your App load times!
JavaScript
3
star
36

frontend-challenge

Blackbox Vision Frontend Challenge
2
star
37

react-firebase-auth

πŸŽ‰React Firebase Auth module, with support for I18N
TypeScript
2
star
38

ra-data-jsonapi-microservices

πŸš€ React Admin provider with support for microservices with JSON API
TypeScript
2
star
39

curly-import-loader

[DEPRECATED] Converts curly import in ES6 to full path import, it reduces the size of the bundle generated by webpack
JavaScript
2
star
40

library-boilerplate

πŸš€ Boilerplate to easily bootstrap your own library targeting ESM, UMD, and CommonJS.
JavaScript
2
star
41

ra-firebase-starter

React Admin + Firebase πŸ”₯ = πŸŽ‰ πŸŽ‰
TypeScript
2
star
42

react-redux-starter-kit

[DEPRECATED] πŸš€ Universal starter kit with React/Redux
JavaScript
2
star
43

mrz-api

API to get data from MRZ documents (DNI, Passports, Drivers Licenses)
JavaScript
1
star