A REST API for managing student information built with Bun, TypeScript, Express, Prisma, and PostgreSQL.
-
Install dependencies
bun install
-
Configure database
# Create .env file DATABASE_URL="postgresql://username:password@localhost:5432/student_info_db"
-
Setup database
bunx prisma generate bunx prisma migrate dev --name init
-
Start server
bun run dev
Server runs at http://localhost:3000
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check |
POST |
/students |
Create student |
GET |
/students |
Get all students |
GET |
/students/:id |
Get student by ID |
PUT |
/students/:id |
Update student |
DELETE |
/students/:id |
Delete student |
{
"id": 1,
"name": "John Doe",
"email": "[email protected]",
"age": 20
}Import StudentInfoAPI.postman_collection.json into Postman for testing all endpoints.
Built with ❤️ using Bun