All Projects → BlackBoxVision → Typescript Hapi Starter

BlackBoxVision / Typescript Hapi Starter

Licence: mit
🚀 Starter for building APIs with Hapi + Typescript!

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Typescript Hapi Starter

Logging Log4j2
Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback's architecture.
Stars: ✭ 1,133 (+868.38%)
Mutual labels:  api, library
Async Gamequery Lib
A high-performance java game query library designed for steam/source based games and others
Stars: ✭ 88 (-24.79%)
Mutual labels:  api, library
Ratp Api Rest
This project turnkey is distributed as a middleware to expose RATP realtime data as REST resources
Stars: ✭ 68 (-41.88%)
Mutual labels:  api, swagger-ui
Webdriver Rust
Library implementing the wire protocol for the W3C WebDriver standard.
Stars: ✭ 56 (-52.14%)
Mutual labels:  api, library
Soundcloud
Soundcloud.com API wrapper written in PHP with OAuth2 support.
Stars: ✭ 94 (-19.66%)
Mutual labels:  api, library
Adrestia
APIs & SDK for interacting with Cardano.
Stars: ✭ 56 (-52.14%)
Mutual labels:  api, library
Openapi Viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 82 (-29.91%)
Mutual labels:  api, swagger-ui
Restless
Express.js api, type safe validations and more
Stars: ✭ 32 (-72.65%)
Mutual labels:  api, library
Discord.jl
The Julia Discord API Wrapper
Stars: ✭ 93 (-20.51%)
Mutual labels:  api, library
Amadeus Node
Node library for the Amadeus Self-Service travel APIs
Stars: ✭ 91 (-22.22%)
Mutual labels:  api, library
Hadotnet
🏡 A .NET Standard library for Home Assistant.
Stars: ✭ 52 (-55.56%)
Mutual labels:  api, library
Grammers
(tele)gramme.rs - use Telegram's API from Rust
Stars: ✭ 109 (-6.84%)
Mutual labels:  api, library
Lara Eye
Filter your Query\Builder using a structured query language
Stars: ✭ 39 (-66.67%)
Mutual labels:  api, library
Best Of Web Python
🏆 A ranked list of awesome python libraries for web development. Updated weekly.
Stars: ✭ 1,118 (+855.56%)
Mutual labels:  api, library
Hellobooks
A Single-Page Library Management App built with nodejs, express and react and redux
Stars: ✭ 37 (-68.38%)
Mutual labels:  api, library
Libgui
Buttons & Co
Stars: ✭ 78 (-33.33%)
Mutual labels:  api, library
Python Common Cache
This project is a cache component based on the memory and it is lightweight, simple and customizable. 🐍 😃
Stars: ✭ 21 (-82.05%)
Mutual labels:  api, library
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+33735.9%)
Mutual labels:  api, swagger-ui
Ccxt.net
CCXT.NET – CryptoCurrency eXchange Trading Library for .NET
Stars: ✭ 89 (-23.93%)
Mutual labels:  api, library
Xseries
Library for cross-version Minecraft Bukkit support and various efficient API methods.
Stars: ✭ 109 (-6.84%)
Mutual labels:  api, library

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:

  • [x] Simple test suite - added by the help of @jcloutz
  • [x] 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].