add html plugin
This commit is contained in:
parent
277e70318d
commit
b0c2dba1d6
6 changed files with 24 additions and 2 deletions
|
|
@ -1,11 +1,13 @@
|
|||
import { Elysia } from "elysia";
|
||||
import { staticPlugin } from '@elysiajs/static'
|
||||
import { html } from '@elysiajs/html'
|
||||
|
||||
const app = new Elysia()
|
||||
.use(html())
|
||||
.use(staticPlugin({
|
||||
assets: "../frontend/", prefix: "/"
|
||||
assets: "src/public/", prefix: "/"
|
||||
}))
|
||||
.get("/", () => Bun.file("../frontend/index.html"))
|
||||
.get("/", () => Bun.file("src/pages/index.html"))
|
||||
.listen(3000);
|
||||
|
||||
console.log(
|
||||
|
|
|
|||
15
src/pages/index.html
Normal file
15
src/pages/index.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ConvertX</title>
|
||||
<link rel="stylesheet" href="pico.lime.min.css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<main class="container">
|
||||
<h1>Hello world!</h1>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
4
src/public/pico.lime.min.css
vendored
Normal file
4
src/public/pico.lime.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
0
src/public/style.css
Normal file
0
src/public/style.css
Normal file
Loading…
Add table
Add a link
Reference in a new issue