Nuxt 支持部署到Koyeb 无服务器平台只需少量配置。
package.json 文件中的 engines.node 字段设置为Koyeb 支持的 Node.js 版本:{
"engines": {
"node": "20.x"
}
}
package.json 文件中定义了 build 和 start 脚本,以定义如何构建和运行应用程序{
"scripts": {
"build": "nuxt build",
"start": "node .output/server/index.mjs"
}
}
SERVER_PRESET=koyeb