tuukkaviitanen /
api-comparison
A Comparison of Modern Programming Languages in REST API Development
44/100 healthLoading repository data…
aashari / repository
A modern REST API boilerplate built with Bun runtime and Elysia framework. Offers superior performance over Node.js with MongoDB integration, request validation, authentication middleware, comprehensive error handling, and Docker deployment configurations.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository contains a professional boilerplate for building a REST API using the Bun runtime,
an alternative to Node.js designed to be faster and more efficient. The project is structured using Elysia,
a minimalist web framework for Bun, and mongoose for MongoDB object modeling.
This project provides a complete, production-ready REST API that manages authors and their blog posts. It demonstrates:
Suitable for both learning purposes and as a foundation for production applications.
Before you begin, ensure you have the following installed:
curl -fsSL https://bun.sh/install | bashSelected from shared topics, language and repository description—not editorial ratings.
tuukkaviitanen /
A Comparison of Modern Programming Languages in REST API Development
44/100 healthRobertcego /
A TypeScript-based REST API built with Express.js, designed as a practice implementation for learning modern Node.js API development patterns.
27/100 healthShashuvo /
git clone https://github.com/aashari/boilerplate-rest-api-bun.git
cd boilerplate-rest-api-bun
# Copy the example environment file
cp .env.example .env
Note: The default values in .env should work out of the box for local development.
# Start MongoDB and Mongo Express
./api.sh mongo-up
# You can access Mongo Express at http://localhost:8081
Note: Mongo Express is a web-based MongoDB admin interface that lets you view and modify your database.
Install the project dependencies using Bun. This will also generate a bun.lock file (instead of the older bun.lockb) to ensure consistent installs across environments. Dependencies are kept up-to-date.
bun install
# Start the API in the background
./api.sh start
# Check the logs
./api.sh logs
The server will start at http://localhost:3000 by default.
Note: If you want to see the server logs in real-time, press Ctrl+C to exit the logs view while keeping the server running.
This project includes a helper script (api.sh) to make it easier to manage the API and MongoDB:
# Show available commands
./api.sh help
# Start the API
./api.sh start
# Check if the API is running
./api.sh status
# View API logs
./api.sh logs
# Stop the API
./api.sh stop
# Start MongoDB containers
./api.sh mongo-up
# Stop MongoDB containers
./api.sh mongo-down
GET /posts - Get all postsPOST /posts - Create a new postGET /posts/:id - Get a post by IDPUT /posts/:id - Update a post by IDDELETE /posts/:id - Delete a post by IDGET /authors - Get all authorsPOST /authors - Create a new authorGET /authors/:id - Get an author by IDPUT /authors/:id - Update an author by IDDELETE /authors/:id - Delete an author by IDGET / - Returns a simple "hello world" message.
├── src/
│ ├── _mongo/ # MongoDB connection and models
│ │ ├── index.ts # MongoDB connection setup
│ │ ├── model.author.ts # Author model
│ │ └── model.post.ts # Post model
│ ├── authors/ # Author-related components
│ │ ├── dto.ts # Author Data Transfer Object
│ │ ├── index.ts # Author routes
│ │ └── service.ts # Author service functions
│ ├── posts/ # Post-related components
│ │ ├── dto.ts # Post Data Transfer Object
│ │ ├── index.ts # Post routes
│ │ └── service.ts # Post service functions
│ ├── index.ts # Main application entry point
│ └── type.ts # Common types and interfaces
├── .env.example # Example environment variables
├── api.sh # Helper script for managing the API
├── docker-compose.yml # Docker Compose configuration
├── GUIDE.md # Comprehensive guide for running and testing
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration
Entry Point (src/index.ts)
MongoDB Connection (src/_mongo/index.ts)
Models (src/_mongo/model.author.ts and src/_mongo/model.post.ts)
Routes and Controllers
Data Transfer Objects (DTOs)
bun run dev
This will start the server with hot reloading enabled, which means changes to your code will automatically restart the server.
The following environment variables can be configured in the .env file:
PORT: The port on which the server will run (default: 3000)SERVER_NAME: The name of the server (default: boilerplate-rest-api-bun)MONGODB_URI: The MongoDB connection URI (default: mongodb://localhost:27017)MONGODB_DATABASE: The MongoDB database name (default: boilerplate_db)NODE_ENV: The environment mode (development, production, etc.)This project includes Mongo Express, a web-based MongoDB admin interface. When you start the Docker Compose setup, you can access Mongo Express at http://localhost:8081.
You can use Mongo Express to:
docker ps.env file is correct./api.sh mongo-down followed by ./api.sh mongo-up./api.sh logs or cat app.logbun install.env match those in docker-compose.ymlMONGODB_USER and MONGODB_PASSWORD from .envFor a comprehensive guide on running and testing the API, see the GUIDE.md file. This guide includes:
curlDistributed under the MIT License. See LICENSE for more information.
A learning-focused Node.js and TypeScript backend repository covering REST API development, Express.js server architecture, database integration, authentication, middleware, JWT, and role-based authorization.
jahidhiron /
This project is a modern Node.js REST API built with TypeScript, designed to showcase my backend development skills and serve as part of my personal branding portfolio. It demonstrates clean architecture, modular code organization, and best practices for scalable API development.
27/100 healthPasandul-pro /
A full-stack Product Store application built with React and Node.js, featuring user authentication, product management, and comment functionality. The project uses Clerk for authentication and is deployed with a React frontend on Vercel and a Node.js backend on Render. It demonstrates REST API development, state management, and modern full-stack de
65/100 health