Nattyboi commited on
Commit
9cc6a57
·
1 Parent(s): 2764350

hopefully final commit

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. Dockerfile +1 -1
  3. 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 3000
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("/tmp/uploads")) {
55
- fs.mkdirSync("/tmp/uploads");
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