This project is a template for building modern web applications using the Elysia framework with Bun runtime, integrated with Drizzle ORM for database management and Better-Auth for enhanced authentication.
Before you begin, ensure you have the following installed:
- Bun - A fast JavaScript runtime
- A compatible database supported by Drizzle
To get started, clone this repository:
git clone https://github.com/LovelessCodes/elysia-better-auth.git
After setting up, navigate into the project directory:
cd elysia-better-auth
- Database Setup: Configure your database connection in the
.env
file at the project root. Drizzle ORM supports multiple databases, so choose the configuration that fits your setup. - Better-Auth Setup: Configure your Better-Auth credentials in the
.env
file at the project root.
To start the development server, run:
bun run dev
Once the server is running, open your browser and visit http://localhost:3131/ to view your application.
To build the application for production, use:
bun run build
This will generate an executable server
file.
./server
Ensure your environment variables are set for production and deploy using your preferred service.
Feel free to explore the codebase and customize it to suit your needs!