https://github.com/jmrl23/fastify-template
A robust and user-friendly template for building Fastify applications. It comes with all the essentials to kickstart your project. Additionally, it's highly flexible, allowing you to effortlessly incorporate your own features and enhancements.
https://github.com/jmrl23/fastify-template
api backend fastify fastify-template fastifyjs http javascript nodejs production-ready restful template typescript web
Last synced: 6 months ago
JSON representation
A robust and user-friendly template for building Fastify applications. It comes with all the essentials to kickstart your project. Additionally, it's highly flexible, allowing you to effortlessly incorporate your own features and enhancements.
- Host: GitHub
- URL: https://github.com/jmrl23/fastify-template
- Owner: jmrl23
- License: mit
- Created: 2024-01-03T17:51:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T14:27:05.000Z (7 months ago)
- Last Synced: 2025-03-19T14:35:07.596Z (7 months ago)
- Topics: api, backend, fastify, fastify-template, fastifyjs, http, javascript, nodejs, production-ready, restful, template, typescript, web
- Language: TypeScript
- Homepage:
- Size: 173 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fastify Template
template for building fastify application
## Installation
```sh
yarn # or npm install
```## Scripts
| Script | Description |
| ---------- | ------------------------------------------- |
| build | build project |
| test | run test files |
| start | start (must build first) |
| start:dev | start on development mode (nodemon + swc) |
| start:prod | start on production mode (must build first) |
| format | format codes (prettier) |
| lint | lint codes (eslint) |## Structure
Default folder structure
```
src
├── app.ts # main fastify instance
├── bootstrap.ts # plugins entrypoint
├── common
│ ├── logger.ts
│ └── typings.ts
├── config
│ └── env.ts
├── init.ts # initialization file
├── main.ts # main entrypoint
├── modules
│ └── todos
│ ├── schemas
│ │ ├── createTodo.schema.ts
│ │ ├── deleteTodo.schema.ts
│ │ ├── getTodo.schema.ts
│ │ ├── getTodos.schema.ts
│ │ ├── todo.schema.ts
│ │ └── updateTodo.schema.ts
│ ├── todos.route.ts
│ ├── todosService.spec.ts
│ └── todosService.ts
├── plugins
│ ├── routesAutoload.ts
│ └── swagger.ts
└── test.ts # test entrypoint
```