当我尝试将节点应用程序用于 运行 应用程序时,它不会在给定端口上 运行。有人可以解释吗?

When i try to use node app to run the application it does not run on the given port . can someone explain?

我正在尝试创建一个 API 以使用 node 和 express 生成随机名称,但 node 应用程序不会 运行

你遇到的错误是因为你试图请求一个不是模块的文件 (WifiNames.json),你可以使用 fs 模块读取它或更改文件扩展名 js 并使用 module.export

导出 json 数组