custom build command per environment
Is it possible to define a custom build command for an Angular app based on the environment?
I need to trigger different npm scripts depending on the "ng build --configuration "ng build --configuration railway-staging",
16 Replies
Project ID:
d17c573a-a1a2-404c-8095-3e38320f6362
d17c573a-a1a2-404c-8095-3e38320f6362
use an environment variable for the configuration value
That cannot be done in the package.json in the Angulatr project, can it?
Also I am not using Dockerfile.
And Angular cannot access environment variables for build, can it?
you can change the scripts in the package.json to use an environment variable, then set the appropriate service variable in the service settings
That is awesome! I didn’t know you could do that. Thank you so much.
no problem! where you able to get a working implementation?
Yes. I now have independent development and staging environments
awesome, would you care to share examples for anyone reading in the future?
Sure. How would I do that?
just send examples of your start commands and such
Right here in our chat?
yes of course
use triple backticks for code blocks
Alright, will do
Thanks again.
May I ask you: Are you actually a bot?
You answered so quickly
I'm not a bot, was already on my phone with discord open and you asked an easy question so I just answered
😅