how to Configure EBS to run npm install

0

I have node.js application I want to deploy to ebs, however I have two package.jsons for the client and the server. My Idea is that I want server to simply serve the built version of the client.

client
|-package.json
server
|-package.json

I was having a hard time finding in the docs if there was a way to configure the npm install command so it would first run the two installs in each sub directory.

I have nodecommand.config that will start the server ie:

option_settings:
  aws:elasticbeanstalk:container:nodejs:
    NodeCommand: "(cd server && npm run start-prod)"

is there a way to do this for the install as well?

已提問 2 年前檢視次數 929 次
1 個回答
0

You can check this one - https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-specific.html

NodeCommand: Command used to start the Node.js application. If an empty string is specified, app.js is used, then server.js, then npm start in that order.

c3nIvo
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南