Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local.env.js for multiple enviroments/deploys #511

Closed
gintsgints opened this issue Sep 1, 2014 · 7 comments
Closed

local.env.js for multiple enviroments/deploys #511

gintsgints opened this issue Sep 1, 2014 · 7 comments

Comments

@gintsgints
Copy link
Contributor

As I understund local.env.js is used when build fullstack app into dist folder.
Does that mean I cannot distribute already built app (in dist folder) to different site?

@JaKXz
Copy link
Collaborator

JaKXz commented Sep 2, 2014

I think this discussion was had in #429 - the generated ./dist folder is a deployable node.js app, and you should be able to add new remotes as necessary.

Did that answer your question @gintsgints? Or am I missing what you mean?

@gintsgints
Copy link
Contributor Author

Question you mention is related. Because it talks about situation with multiple remotes. But with same local.env.js for all remotes, it will never work. (in local.env.js DOMAIN variable is stored, witch is different for different remotes)

@gintsgints
Copy link
Contributor Author

Sounds like my wories is clarified in
#513 (comment)
enviroment should be set at remote host itself, not using local.env.js file.

@kingcody
Copy link
Member

kingcody commented Sep 3, 2014

That is, if you are not using grunt to serve your app. If you are using grunt it will run local.env.js for you. If you required local.env.js in the main server file(app.js) it would set the variables for you without needing grunt. Just wanted to make sure that was understood.

@gintsgints
Copy link
Contributor Author

Clear. If I use grunt, to start app.. it will use local.env.
But I do not like fact that grunt is needed to start my server at deployment machine.

@DaftMonk
Copy link
Member

DaftMonk commented Sep 3, 2014

@gintsgints Grunt is not needed to start your server on a deployment machine. You can start it as a normal node process as long as you run it with the required environment variables.

@gintsgints
Copy link
Contributor Author

Yeah... enviroment variables is way to go. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants