我的项目包括cube.js后端和Reactive前端。我能够建立CICD使用aws放大前端,但我不确定我是否可以部署cube.js上的aws放大。
在本地环境中,我首先运行'npm‘来运行后端,它在localhost上启动服务:4000,我用'npm’启动了react项目,它运行在localhost:3000上。我希望使用aws放大来构建和部署后端和前端。
我的项目的设置类似于下面的示例https://github.com/cube-js/cube.js/tree/master/examples/react-dashboard
在aws放大中,我为我的前端设置了如下所示
version: 0.1
frontend:
phases:
preBuild:
commands:
- cd dashboard
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: dashboard/build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
如何将后端cube.js项目包括在其中?
发布于 2019-10-31 13:38:03
您可以使用Cube.js Serverless模板将后端部署为一组lambdas:https://cube.dev/docs/deployment#serverless。通过这种方式,您可以将serverless deploy -v
命令作为放大构建周期的一部分,如下所示:
backend:
phases:
preBuild:
commands:
- serverless deploy -v
https://stackoverflow.com/questions/58648330
复制相似问题