Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

A RESTful API template built with Hono and TypeScript, connected to MongoDB, and running on Bun.sh

Notifications You must be signed in to change notification settings

Vitaee/HonoStarter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hono MongoDB Bun.sh API

Description

A RESTful API built with Hono and TypeScript, connected to MongoDB, and running on Bun.sh. This project demonstrates the implementation of CRUD operations, validation, and testing using modern web technologies.

Features

  • CRUD Operations: Create, Read, Update, Delete operations for resources.
  • Validation: Input validation using class-validator and Hono's built-in validator.
  • Testing: Comprehensive testing setup with Jest.
  • Environment Configuration: Manage configuration using environment variables.
  • Modern Technologies: Built with Hono, TypeScript, MongoDB, and Bun.sh.

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/Vitaee/HonoStarter.git
  2. Navigate to the project directory:
    cd HonoStarter
  3. Install dependencies:
    bun install
  4. Set up environment variables: Create a .env file in the root directory and add your MongoDB connection details:
    DB_USER=your_db_user
    DB_PASS=your_db_password
    DB_HOST=your_db_host
    DB_PORT=your_db_port
    DB_DATABASE=your_db_name
    PORT=3000
    

Running the Application

To start the application in development mode:

bun run dev

Running Tests

To run tests:

bun run test

Usage

The API will be available at http://localhost:3000. You can access various endpoints like /users to perform CRUD operations.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

About

A RESTful API template built with Hono and TypeScript, connected to MongoDB, and running on Bun.sh

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published