Skip to content

ofabiodev/elysia-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔑 AUTH API

Basic API structure for a full API project with auth using better-auth with Bun and Elysia.

🔥 This project is modular, reusable, and easy to change.


Running Locally

To run the API locally, you need to configure your environment variables. Copy .env.example to .env and fill in your database credentials and other settings. Then run:

bun dev

Make sure your database is running and accessible with the credentials in .env.


Running with Docker

Docker is just to make it easier to start the API with everything preconfigured. It will build the API, set up the database, and run migrations automatically.

Option 1: API + DB

docker compose -f docker-compose.yml -f docker-compose.override.yml up -d
  • This builds API, spins up a PostgreSQL container, and connects API to it.

Option 2: Only API (use your own DB)

docker compose up -d
  • Connect your .env DB ssettings to an external database.
  • The API will sstart without creating a DB container.

About

🧵 A backend project built with Elysia, focused on high-performance API development using Bun.

Topics

Resources

Stars

Watchers

Forks

Contributors