Skip to content

megayours/megadata-api

Repository files navigation

API Project

A Bun-based API project using Elysia and Bun's native PostgreSQL driver.

Prerequisites

  • Bun 1.2.8 or later
  • PostgreSQL database

Environment Variables

Create a .env file in the root directory with the following variables:

DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=api

Setup

  1. Install dependencies:
bun install
  1. Run migrations:
bun run migrate
  1. Start the development server:
bun run dev

API Documentation

Once the server is running, you can access the Swagger documentation at:

http://localhost:3000/swagger

Available Endpoints

  • GET / - Hello World
  • GET /users - Get all users
  • POST /users - Create a new user

Development

The project uses:

  • Bun's native SQL driver for PostgreSQL
  • Elysia for the web framework
  • Swagger for API documentation
  • CORS for cross-origin requests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors