Prerequisites
Before installing Ceboelha API, ensure you have the following installed on your system:- Bun 1.0 or higher - Download Bun
- MongoDB 6.0 or higher - Install MongoDB
- Git - For cloning the repository
Ceboelha API is built with Elysia and Bun, providing exceptional performance and developer experience.
Installation Steps
Install dependencies
Install the required dependencies using Bun:This will install all dependencies listed in
package.json, including:- Elysia - Fast and ergonomic web framework for Bun
- Mongoose - MongoDB object modeling
- @elysiajs/jwt - JWT authentication
- @elysiajs/cors - CORS support
- @elysiajs/swagger - API documentation
- bcrypt - Password hashing
Set up environment variables
Copy the example environment file and configure it:See the Configuration page for detailed environment variable setup.
Set up the database
Ensure MongoDB is running on your system. Then set up the database:For detailed database setup instructions, see Database Setup.
Verify Installation
Once the server is running, you should see output similar to:http://localhost:3333/docs in your browser to access the interactive API documentation.
Available Scripts
The following npm scripts are available:| Script | Description |
|---|---|
bun run dev | Start development server with hot reload |
bun run start | Start production server |
bun test | Run tests |
bun run test:db | Test MongoDB connection |
bun run db:seed | Seed database with initial data |
bun run db:seed-foods | Seed FODMAP foods data |
bun run lint | Lint code with Biome |
bun run format | Format code with Biome |
Next Steps
Configuration
Configure environment variables and application settings
Database Setup
Set up MongoDB and understand the data models