Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Talento90/typescript-node
:clipboard: TypeScript and NodeJS project template.
https://github.com/Talento90/typescript-node
docker koa2 mysql nodejs typescript
Last synced: about 1 month ago
JSON representation
:clipboard: TypeScript and NodeJS project template.
- Host: GitHub
- URL: https://github.com/Talento90/typescript-node
- Owner: Talento90
- License: mit
- Created: 2015-09-14T23:49:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T01:47:07.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T22:19:38.318Z (8 months ago)
- Topics: docker, koa2, mysql, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 1.05 MB
- Stars: 362
- Watchers: 7
- Forks: 76
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# typescript-node [![Build Status](https://travis-ci.org/Talento90/typescript-node.svg?branch=master)](https://travis-ci.org/Talento90/typescript-node) [![codecov](https://codecov.io/gh/Talento90/typescript-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Talento90/typescript-node) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/7e1b73f83bf7485c9d75e8ea9f853d36)](https://www.codacy.com/app/Talento90/typescript-node?utm_source=github.com&utm_medium=referral&utm_content=Talento90/typescript-node&utm_campaign=Badge_Grade)
Template for building nodejs and typescript services. The main goal of this boilerplate is to offer a good Developer Experience (eg: debugging, watch and recompile) by providing the following features out of the box:
***Features***
* Language - [TypeScript](https://www.typescriptlang.org/)
* REST API - [koa2](http://koajs.com/)
* Graceful Shutdown - [Pattern](https://nemethgergely.com/nodejs-healthcheck-graceful-shutdown/)
* HealthCheck - [Pattern /health](http://microservices.io/patterns/observability/health-check-api.html)
* SQL Database & Migrations - [knex](http://knexjs.org/)
* Authentication and Authorization - [JWT](https://github.com/auth0/node-jsonwebtoken)
* Validation - [Joi](https://github.com/hapijs/joi)
* Testing - [Mocha](https://mochajs.org/) [Chai](http://www.chaijs.com/) + [Sinon](http://sinonjs.org/) [Coverage](https://istanbul.js.org/)
* Code Style - [Prettier](https://prettier.io/)
* Git Hooks - [Husky](https://github.com/typicode/husky)## Installation & Run
* *npm install* - Install dependencies
* *npm run start* - Start application (It needs a mysql database)### Running with Docker
* *docker-compose up* (compose and run, it also creates the mysql database)
* *docker-compose down* (Destroy application and mysql containers)## Useful npm commands
* *npm run build* - Transpile TypeScript code
* *npm run clean* - Remove dist, node_modules, coverage folders
* *npm run coverage* - Run NYC coverage
* *npm run lint* - Lint your TypeScript code
* *npm run start:dev* - Run application in dev mode (debug & watch). Debug mode is running on port 5858 (open `chrome://inspect/#devices`).
* *npm run test* - Run unit tests
* *npm run test:integration* - Run integration tests
* *npm run test:all* - Run Unit and Integration tests