mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-13 03:50:02 -04:00
fix stupid view transition shit and make basic server
This commit is contained in:
parent
2b7380ba57
commit
98cf07b676
7 changed files with 875 additions and 113 deletions
22
server.js
Normal file
22
server.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import fastify from "fastify";
|
||||
import fastifyStatic from "@fastify/static";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const app = fastify({ logger: false });
|
||||
|
||||
await app.register(import("@fastify/compress"));
|
||||
|
||||
app.register(fastifyStatic, {
|
||||
root: path.join(__dirname, "dist"),
|
||||
prefix: "/",
|
||||
serve: true,
|
||||
wildcard: false,
|
||||
});
|
||||
|
||||
app.listen({
|
||||
port: 8080,
|
||||
host: "0.0.0.0",
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue