A Modern Fastify Server built with TypeScript.
This project is a Fastify server that includes a health check endpoint and uses Pino for logging.
- Node.js 22.x
- pnpm
- Fastify server with TypeScript.
- Health check endpoint.
- Pino logging.
- Environment variables configuration.
-
Clone the repository:
git clone [email protected]:galiprandi/fastify-server.git cd fastify-server
-
Install dependencies using pnpm:
pnpm install
To start the server in development mode with auto-reloading:
pnpm run devTo build and start the server in production mode:
pnpm run build
pnpm startThe server configuration can be set using environment variables. Create a .env file in the root directory based on the env.sample file.
GET /health: Returns the health status of the server.
Logging is handled by Pino. The logger configuration can be found in src/lib/logger/pino.ts.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are always welcome! Here's how you can help:
- Fork the repository
- Create a new branch:
git checkout -b feature/amazing-feature - Make your changes
- Run the tests:
pnpm test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Please make sure to:
- Follow the existing code style
- Add tests if applicable
- Update documentation as needed
- Follow the Conventional Commits specification
If you find a bug, please open an issue with:
- A clear title and description
- As much relevant information as possible
- A code sample or test case demonstrating the bug
- GitHub: @galiprandi
- LinkedIn: Germán Aliprandi
Give a ⭐️ if this project helped you!