From 78fe6e9a1a2a2cd380acf10e5c9829325b17cdce Mon Sep 17 00:00:00 2001 From: Gary Date: Mon, 4 Aug 2025 17:11:25 -0400 Subject: [PATCH 1/2] Fix backend bug --- app/backend/index.js | 10 ++++------ app/backend/package.json | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/backend/index.js b/app/backend/index.js index cf76bbf..6170755 100644 --- a/app/backend/index.js +++ b/app/backend/index.js @@ -1,17 +1,16 @@ // backend/index.js import { prompt } from "./prompts.mjs"; import cors from "cors"; -const express = require('express'); +import express from "express"; + const app = express(); const PORT = 5000; app.use(cors()); app.use(express.json()); - app.post("/api/prompt", async (req, res) => { - const { text, tone } = req.body;A - + const { text, tone } = req.body; try { const result = await prompt(text, tone); res.json({ result }); @@ -22,5 +21,4 @@ app.post("/api/prompt", async (req, res) => { app.listen(PORT, () => { console.log(`Server running on http://localhost:${PORT}`); -}); - +}); \ No newline at end of file diff --git a/app/backend/package.json b/app/backend/package.json index 4a8c792..d227ad0 100644 --- a/app/backend/package.json +++ b/app/backend/package.json @@ -11,7 +11,7 @@ "keywords": [], "author": "", "license": "ISC", - "type": "commonjs", + "type": "module", "dependencies": { "cors": "^2.8.5", "dotenv": "^17.2.0", From 6d22474800bacf5dcdc0427948d5b0a68789b6ab Mon Sep 17 00:00:00 2001 From: Gary Date: Mon, 4 Aug 2025 17:15:19 -0400 Subject: [PATCH 2/2] edit docker filename --- app/{DockerFile => Dockerfile} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/{DockerFile => Dockerfile} (100%) diff --git a/app/DockerFile b/app/Dockerfile similarity index 100% rename from app/DockerFile rename to app/Dockerfile