postman接口关联实例代码
时间: 2023-10-07 21:09:57 浏览: 142
好的,关于postman接口关联实例代码,您可以参考以下示例代码:
```
const express = require('express');
const app = express();
const port = 3000;
const postmanApi = (req, res, next) => {
const { name } = req.params;
res.send(`Hello ${name}!`);
};
app.get('/postman/:name', postmanApi);
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`);
});
```
希望对您有所帮助!
阅读全文