Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/citrusprod/fastify-starter
Starter template for Fastify application.
https://github.com/citrusprod/fastify-starter
esbuild eslint fastify prettier prisma typescript
Last synced: about 4 hours ago
JSON representation
Starter template for Fastify application.
- Host: GitHub
- URL: https://github.com/citrusprod/fastify-starter
- Owner: CitRUSprod
- Created: 2022-04-14T17:57:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-24T23:39:13.000Z (over 1 year ago)
- Last Synced: 2023-05-25T00:24:14.381Z (over 1 year ago)
- Topics: esbuild, eslint, fastify, prettier, prisma, typescript
- Language: TypeScript
- Homepage:
- Size: 220 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fastify Starter
### Get started
> **NOTE:** Before using this template, you need to install `pnpm`.
Create a new project based on this template using `degit`:
```sh
pnpx degit CitRUSprod/fastify-starter my-app
cd my-app
pnpm i
```Run in development mode:
```sh
pnpm dev
```Build and run in production mode:
```sh
pnpm build
pnpm start
```Links:
- http://localhost:6500 - API
- http://localhost:6500/docs - API documentation### Tools
Database operations with `prisma`:
```sh
pnpm prisma:generate
pnpm prisma:studio
pnpm prisma:migrations:create
pnpm prisma:migrations:run
pnpm prisma:migrations:reset
pnpm prisma:seeds:run
```Commit with `commitizen`:
```sh
pnpm commit
```Check types with `tsc`:
```sh
pnpm validate
```Lint with `prettier` and `eslint`:
```sh
pnpm lint
```Format with `prettier` and `eslint`:
```sh
pnpm format
```### Environment variables
All environment variables are written to the `.env` file. If it doesn't exist, just enter this command:
```sh
cp .env.example .env
```### Database
> **NOTE:** Before using the database from this template, you need to install `docker` and `docker compose`.
Start and stop the `postgres` database:
```sh
db/start
db/stop
```