https://github.com/drproteus/bun-pg-s3-backend
https://github.com/drproteus/bun-pg-s3-backend
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/drproteus/bun-pg-s3-backend
- Owner: drproteus
- Created: 2025-08-30T03:57:00.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-08-30T04:00:54.000Z (11 months ago)
- Last Synced: 2025-09-01T06:35:11.658Z (10 months ago)
- Language: JavaScript
- Size: 403 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.