14 lines
308 B
JavaScript
14 lines
308 B
JavaScript
|
|
const express = require('express');
|
||
|
|
const app = express();
|
||
|
|
const PORT = 3000;
|
||
|
|
|
||
|
|
app.get('/', (req, res) => {
|
||
|
|
res.json({
|
||
|
|
message: '测试服务器运行正常',
|
||
|
|
timestamp: new Date().toISOString()
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
app.listen(PORT, () => {
|
||
|
|
console.log(`测试服务器正在端口 ${PORT} 上运行`);
|
||
|
|
});
|