更改端口 3005
This commit is contained in:
@@ -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}`)
|
||||
})
|
||||
+1
-1
@@ -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: '上传成功',
|
||||
|
||||
Reference in New Issue
Block a user