Skip to content

Commit 632623e

Browse files
committed
Update
1 parent 37f85e0 commit 632623e

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

api/server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import express, { Request, Response } from "express";
22
import axios from "axios";
33
import sharp from "sharp";
4+
import cors from "cors";
45
import path from "path";
56
import fs from "fs";
67

78
const app = express();
9+
10+
app.use(cors());
811
// Use environment PORT for hosting environments like Render, default to 3000 for local dev
912
const PORT = process.env.PORT || 3000;
1013

package-lock.json

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
},
1010
"dependencies": {
1111
"axios": "^1.12.2",
12+
"cors": "^2.8.5",
1213
"express": "^4.21.2",
1314
"sharp": "^0.33.5"
1415
},
1516
"devDependencies": {
17+
"@types/cors": "^2.8.19",
1618
"@types/express": "^4.17.23",
1719
"@types/node": "^24.5.2",
1820
"nodemon": "^3.1.10",

0 commit comments

Comments
 (0)