https://github.com/nodefactoryio/node-ts-starter-fastify
Template repository for NodeJs and Fastify powered API
https://github.com/nodefactoryio/node-ts-starter-fastify
fastify nodejs template typescript
Last synced: 4 months ago
JSON representation
Template repository for NodeJs and Fastify powered API
- Host: GitHub
- URL: https://github.com/nodefactoryio/node-ts-starter-fastify
- Owner: NodeFactoryIo
- License: mit
- Created: 2020-04-12T07:52:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-03T09:07:42.000Z (over 2 years ago)
- Last Synced: 2023-03-06T13:17:21.553Z (over 2 years ago)
- Topics: fastify, nodejs, template, typescript
- Language: TypeScript
- Size: 1.16 MB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# NodeJs Typescript Starter

[](https://coveralls.io/github/NodeFactoryIo/node-ts-starter-fastify?branch=master)
[](https://github.com/NodeFactoryIo/node-ts-starter-fastify/blob/master/LICENSE)
[](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2FNodeFactoryIo%2Fnode-ts-starter-fastify)Starter repository for developing fast API services with typescript and fastify.
Docker friendly with default CI configuration.## Requirements
Following software is required to be installed to use this repo:
* [NodeJs](https://nodejs.org/en/) >= v12
* [Yarn](https://yarnpkg.com/en/docs/install#debian-stable)
* Docker
* docker-compose## Usage
- `yarn install` - will run and configure everything for you
#### Database
- use `yarn db:migration:new ` to generate new empty migration file (same goes for entity and subscriber)
- use `docker-compose exec backend yarn db:migration:generate ` to generate new auto generated migration
- `yarn db:migrate` - runs all pending migrations against database
- `yarn db:revert` - reverts last migration, run multiple times to revert everything
- `yarn db:seed` - seeds database with fake data (`src/services/db/seeders`)
- `yarn run test:unit` - runs unit tests with coverage
- `yarn run lint` runs following commands:
- `yarn run lint:style` - runs eslint against source code
- `yarn run lint:types` - checks typescript types
- `yarn run start:dev` - runs docker-compose with your server and database, app will autoreload on changes