Skip to content

Commit

Permalink
feat: support static files
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 6, 2024
1 parent 5f22eec commit 05c214d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Features
- [x] App based folder structure
- [x] Postgres database support (drizzle)
- [x] Serve static files

## Getting Started
To get started with this template, simply paste this command into your terminal:
Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"migrate": "npx drizzle-kit migrate"
},
"dependencies": {
"@elysiajs/static": "^1.1.1",
"drizzle-orm": "^0.33.0",
"elysia": "latest",
"postgres": "^3.4.4"
Expand Down
Empty file added public/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { Elysia } from "elysia";
import exampleApp from "./example_app/routers";
import { APP_PORT } from "./config";
import staticPlugin from "@elysiajs/static";

const app = new Elysia()
// static plugin
// more information: https://elysiajs.com/plugins/static
.use(staticPlugin())
.use(exampleApp)
.listen(APP_PORT);

Expand Down

0 comments on commit 05c214d

Please sign in to comment.