This project is a RESTful API built using Bun and Prisma for efficient JavaScript runtime. Follow the steps below to set up and run the project successfully.
Make sure you have the following prerequisites installed:
- Bun (v1.0.18 or later)
Clone the repository and install dependencies:
git clone https://github.com/justluck-rs/rest-api-bun-elysia-prisma.git
cd rest-api-bun-elysia-prisma
bun install
Create a database and set the connection URL in the .env
:
Edit the .env
file with your database connection URL and other configuration details:
DATABASE_URL="postgresql://username:password@localhost:5432/your_database_name?schema=public"
Replace username
, password
, and your_database_name
with your PostgreSQL credentials and desired database name.
Apply Prisma migrations to create and update the database schema:
bunx prisma migrate dev
Start the application:
bun run dev
The API will be accessible at http://localhost:3000
. Make sure your database is running and accessible.
http://localhost:3000