A ready-to-use folder structure for building backend applications with Fastify. This project provides a clean, organized template to help you quickly start developing your Fastify-based API with best practices in mind.
This structure includes pre-configured integrations for:
- Fastify - Fast and low overhead web framework
- CORS - Cross-Origin Resource Sharing support
- Helmet - Security headers middleware
- PostgreSQL - Database integration
- bcrypt - Password hashing
- dotenv - Environment variable management
Follow these steps to set up the project on your local machine:
- Node.js (v14 or higher recommended)
- npm (comes with Node.js)
-
Clone the repository
git clone https://github.com/4H-Darkmode/Fastify-Example-Structure.git
-
Navigate to the project directory
cd Fastify-Example-Structure
-
Install dependencies
npm install
-
Configure environment variables
- Copy all files from the repository to your working directory
- Create a
.env
file and configure your environment variables as needed
-
Start developing!
You're now ready to build your Fastify application using this structured template.
This project is open source and available for use in your own projects.