feat: new separate frontend and backend folders with fastify as nodejs framework, libreconvert is configured in fastify as route

This commit is contained in:
theoleuthardt 2025-02-14 14:40:35 +01:00
parent 7b584d2fff
commit 9733de9a39
26 changed files with 1171 additions and 61 deletions

15
backend/server.ts Normal file
View 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}`);
});