diff --git a/app.js b/app.js index 3fcc702..f5ff78d 100644 --- a/app.js +++ b/app.js @@ -58,7 +58,7 @@ router.use('/api/stock', stockRoutes) app.use(router.routes()) app.use(router.allowedMethods()) -const PORT = process.env.PORT || 3000 +const PORT = process.env.PORT || 3005 app.listen(PORT, () => { console.log(`Server running on port ${PORT}`) }) \ No newline at end of file diff --git a/routes/upload.js b/routes/upload.js index c7a81e8..ba93595 100644 --- a/routes/upload.js +++ b/routes/upload.js @@ -36,7 +36,7 @@ router.post('/', upload.single('file'), async (ctx) => { return } - const fileUrl = `http://localhost:3000/uploads/${ctx.file.filename}` + const fileUrl = `http://localhost:3005/uploads/${ctx.file.filename}` ctx.body = { code: 200, message: '上传成功',