mirror of
https://github.com/theoleuthardt/werkzeugkiste.git
synced 2026-06-13 09:37:53 +00:00
feat: new separate frontend and backend folders with fastify as nodejs framework, libreconvert is configured in fastify as route
This commit is contained in:
parent
7b584d2fff
commit
9733de9a39
26 changed files with 1171 additions and 61 deletions
15
backend/server.ts
Normal file
15
backend/server.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import Fastify from "fastify";
|
||||
import cors from "@fastify/cors";
|
||||
import multipart from '@fastify/multipart';
|
||||
import { libreConvert } from "./src/routes/libreconvert.route";
|
||||
|
||||
const app = Fastify({ logger: true });
|
||||
|
||||
app.register(cors, { origin: "*" });
|
||||
app.register(multipart);
|
||||
app.register(libreConvert);
|
||||
|
||||
const PORT = process.env.PORT || 4000;
|
||||
app.listen({ port: Number(PORT), host: "0.0.0.0" }, () => {
|
||||
console.log(`🚀Fastify is live on http://localhost:${PORT}`);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue