An open API service indexing awesome lists of open source software.

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.

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
```