mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-09-24 15:00:28 +08:00
add html plugin
This commit is contained in:
+4
-2
@@ -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(
|
||||
|
||||
@@ -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>
|
||||
Vendored
+4
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user