[英]nodejs app crash on openai dall-e 2 api rejected request
[英]Nodejs fastify crash heruku api
我正在尝试加载一个用nodejs
和fastify
编写的简单 api ,如下面的代码所示。
当我尝试打开页面时,我在logs
中收到这样的错误,并且页面给了我Application
错误。
你能帮我个忙吗?
at=error code=H10 desc="App crashed" method=GET path="/"... dyno= connect= service= status=503 bytes= protocol=https
package.json
{
"name": "fastPro",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node src/index.js",
"dev": "nodemon src/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"fastify": "^3.11.0",
"nodemon": "^2.0.7"
}
}
index.js
const fastify = require('fastify')()
// Declare a route
fastify.get('/', (request, reply) => {
reply.send({ hello: 'world!' })
})
// Run the server!
fastify.listen(process.env.PORT, (err, address) => {
if (err) throw err
fastify.log.info(`server listening on ${address}`)
})
档案
web: node src/index.js
worker: node src/index.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.