将监听端口改为全部地址==-==

This commit is contained in:
2025-09-21 15:27:14 +08:00
parent 9145aea047
commit 1034d1371f

2
app.js
View File

@@ -100,7 +100,7 @@ fastify.addHook('onRequest', async (request, reply) => {
const start = async () => {
try {
// 监听 3000 端口
await fastify.listen({ port: 3000 });
await fastify.listen({ port: 3000, host: '0.0.0.0'});
} catch (err) {
// 如果启动失败,打印错误日志并退出
fastify.log.error(err);