1

I'm trying to start my application with a different file; not app.js or server.js, and I don't want to add a start script to npm as there's several possible configurations for this application. In the elastic beanstalk console, under Configuration -> Software Configuration, there's a Node command setting, and I'm setting the value to the file I want, like:

eb_server.js 

and also tried node eb_server.js

But in the nodejs logs on the app server (/var/log/nodejs/nodejs.log, I get this output:

sh: eb_server.js: command not found 

My question is what's the proper way to set the alternative start script command using the elastic beanstalk console?

1 Answer 1

1

Turns out it's not meant for a node command directly, but rather an npm command. You can specify "npm run ", where you can call the custom node start command, pointing to whatever file you want. Naming is hard... ;-)

Sign up to request clarification or add additional context in comments.

1 Comment

I even tried npm run deploy, still EB runs npm start, and since I've removed npm start, it throws error saying that start command not found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.