Skip to content

最新版并不支持指定端口号 #10

@superzw

Description

@superzw

问题:执行yapi server --port 9290依然提示9090端口。
yapi-cli版本:1.5.0
问题版本代码:
src/commands/server.js文件中
` app.get('/api/base', async function (req, res) {

  let versions = await utils.getVersions();
  res.send({
    versions,
    root: path.resolve(process.cwd(), 'my-yapi')
  })

})
app.use(express.static(path.resolve(__dirname, './server')))
app.listen(9090)
console.log('在浏览器打开 http://0.0.0.0:9090 访问。非本地服务器,请将 0.0.0.0 替换成指定的域名或

ip ');`
写死了端口。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions