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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠