mirror of
https://github.com/theoleuthardt/werkzeugkiste.git
synced 2026-06-13 09:37:53 +00:00
fix: all pages now use the right backend url + backend uses .env of root too
This commit is contained in:
parent
0d92719258
commit
607d496f2a
11 changed files with 22 additions and 14 deletions
|
|
@ -10,6 +10,10 @@ import { generateQRCode } from "./src/routes/generateqrcode.route";
|
|||
import { wordCounter } from "./src/routes/wordcounter.route";
|
||||
import { videoToAudio } from "./src/routes/videotoaudio.route";
|
||||
import { removeBG } from "./src/routes/removebg.route";
|
||||
import dotenv from "dotenv";
|
||||
import path from "node:path";
|
||||
|
||||
dotenv.config({ path: path.resolve(__dirname, "../.env") });
|
||||
|
||||
const app = Fastify({ logger: true });
|
||||
|
||||
|
|
@ -30,7 +34,8 @@ app.register(wordCounter);
|
|||
app.register(videoToAudio);
|
||||
app.register(removeBG);
|
||||
|
||||
const PORT = process.env.PORT || 4000;
|
||||
console.log("Starting Fastify server...");
|
||||
const PORT = process.env.BACKEND_PORT;
|
||||
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