Support Topics Documentation Slack YouTube Blog

Pass different configurations to coderunner deploy

Backendless Version (3.x / 5.x, Online / Managed / Pro )

Online

Client SDK (REST / Android / Objective-C / Swift / JS )

REST

Question

Is it possible to pass different configuration files, probably different coderunner.json files to the coderunner executable?

I have a couple of environments and I’m doing npm run deploy to deploy my changes to that specific environment, but would be nice to do something like npm run deploy --production so the coderunner deploys to the correct invironment.

I see the coderunner.json file has the application id in there so I’ve been changing the values back and forth to deploy to the corresponding environment but would be great if I can do this automatically.

Hi Racardo,

It is possible to do it with the -c <path> parameter. You can see a list of all available parameters at:

Alternatively, you can modify package.json as shown below:

"scripts": {
    "debug": "coderunner debug",
    "deploy": "coderunner deploy"
    "deploy:prod": "coderunner deploy --config ./coderunner-prod.json"
  },
...

And then run npm run deploy:prod to launch that configuration.

Hope this helps.

Regards,
Mark

This is exactly what we needed! Thanks a lot for the information Mark! Good to know the coderunner supports all these parameters. :tada:

1 Like