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

https://github.com/drproteus/bun-pg-s3-backend


https://github.com/drproteus/bun-pg-s3-backend

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# Bun Postgres and S3 Template

Working prototype of storing collection of items with media (image) attachments.

## Setup

Get [Bun](https://bun.sh).

```
bun install
```

## Environment

Create a `.env` in the repo directory and add the following (customize accordingly):
```
POSTGRES_URL=postgres://postgres@localhost:5432/test
S3_ENDPOINT=http://localhost:9000
S3_BUCKET=images
S3_ACCESSKEYID=minioadmin
S3_SECRETACCESSKEY=minioadmin
```

## Run

```bash
bun run build
bun run serve
```

Defaults to http://localhost:3000.

## Files

* `src/js/server.js`: Main server with clients, models, and API routes.
* `src/js/app.js`: Main front-end script.
* `dist/index.html`: Main front-end page.
* `src/css/main.css`: Custom CSS.