hopefully final commit
Browse files- .gitignore +1 -0
- Dockerfile +1 -1
- api/index.ts +3 -2
.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1 |
.vercel
|
|
|
|
1 |
.vercel
|
2 |
+
/node_modules
|
Dockerfile
CHANGED
@@ -18,7 +18,7 @@ RUN npm install --no-cache
|
|
18 |
COPY --chown=user . .
|
19 |
|
20 |
# Expose the port the app runs on
|
21 |
-
EXPOSE
|
22 |
|
23 |
# Start the development server
|
24 |
CMD ["npm", "run", "dev"]
|
|
|
18 |
COPY --chown=user . .
|
19 |
|
20 |
# Expose the port the app runs on
|
21 |
+
EXPOSE 3001
|
22 |
|
23 |
# Start the development server
|
24 |
CMD ["npm", "run", "dev"]
|
api/index.ts
CHANGED
@@ -50,9 +50,10 @@ app.use(
|
|
50 |
})
|
51 |
);
|
52 |
|
|
|
53 |
// Create uploads directory if it doesn't exist
|
54 |
-
if (!fs.existsSync(
|
55 |
-
fs.mkdirSync(
|
56 |
}
|
57 |
|
58 |
// Configure multer for file uploads
|
|
|
50 |
})
|
51 |
);
|
52 |
|
53 |
+
const uploadDir = path.join(__dirname, "uploads");
|
54 |
// Create uploads directory if it doesn't exist
|
55 |
+
if (!fs.existsSync(uploadDir)) {
|
56 |
+
fs.mkdirSync(uploadDir);
|
57 |
}
|
58 |
|
59 |
// Configure multer for file uploads
|