1 Star 0 Fork 0

coder_fxf/nodejs

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
app-2.js 506 Bytes
一键复制 编辑 原始数据 按行查看 历史
fengxf 提交于 2026-06-02 20:19 +08:00 . 1
const express = require("express");
const { getLogs } = require("./utils/index");
const app = express();
app.get("/", (req, res) => {
res.send("/index");
});
app.get("/user", (req, res, next) => {
getLogs(req)
// 调用next 交给后续中间件处理
next()
}, (req, res, next) => {
// 在这里接受之前中间件的处理结果
res.send(req.url);
});
// 监听服务
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`服务器${PORT} 端口已监听`);
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/coderfxf/nodejs.git
git@gitee.com:coderfxf/nodejs.git
coderfxf
nodejs
nodejs
master

搜索帮助