Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/elnurbda/prisma-elysia-boiler-plate

A simple ElysiaJS project with Swagger, CORS, and Prisma integrated.
https://github.com/elnurbda/prisma-elysia-boiler-plate

bun bunjs cors elysiajs prisma swagger typescript

Last synced: 7 days ago
JSON representation

A simple ElysiaJS project with Swagger, CORS, and Prisma integrated.

Awesome Lists containing this project

README

        

# ElysiaJS Boilerplate Project

A simple ElysiaJS project with Swagger, CORS, and Prisma integrated.

## Features

- **ElysiaJS**: A lightweight and fast web framework.
- **Swagger**: API documentation available at `/swagger`.
- **CORS**: Cross-Origin Resource Sharing enabled.
- **Prisma**: Database ORM for easy data management.

## Database

- **Default DB**: PostgreSQL
- **ORM**: Prisma is used to interact with the database.
- **Schema**: Located at `prisma/schema.prisma`

### Prisma Commands

To initialize and manage Prisma, use the following commands:

```bash
# Initialize Prisma (already done)
bun prisma init

# Generate Prisma client
bun prisma generate

# Run database migrations
bun prisma migrate
```

## Swagger Documentation

Access the Swagger documentation at `/swagger`.

![Swagger UI](images/swagger.png)

## Getting Started

To create a new project using this boilerplate, run:

```bash
# From template
bun create ElnurBDa/prisma-elysia-boiler-plate app

cd app

docker compose up -d
```

## License

This project is licensed under the MIT License.