-
Notifications
You must be signed in to change notification settings - Fork 25
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
Defaults block is not actually the default #34
Comments
sirwesley
changed the title
Defaults block is not actually the defaults
Defaults block is not actually the default
Nov 15, 2017
I believe |
You can change the fallback environment in the case where no domains match by calling // set the domains and variables for each environment
envServiceProvider.config({
domains: {
development: ["localhost", "acme.dev.local"],
production: ["acme.com", "*.acme.com", "acme.dev.prod"],
test: ["test.acme.com", "acme.dev.test", "acme.*.com"],
// anotherStage: ['domain1', 'domain2']
},
vars: {
development: {
apiUrl: "//api.acme.dev.local/v1",
staticUrl: "//static.acme.dev.local",
// antoherCustomVar: 'lorem',
// antoherCustomVar: 'ipsum'
},
test: {
apiUrl: "//api.acme.dev.test/v1",
staticUrl: "//static.acme.dev.test",
// antoherCustomVar: 'lorem',
// antoherCustomVar: 'ipsum'
},
production: {
apiUrl: "//api.acme.com/v1",
staticUrl: "//static.acme.com",
// antoherCustomVar: 'lorem',
// antoherCustomVar: 'ipsum'
},
// anotherStage: {
// customVar: 'lorem',
// customVar: 'ipsum'
// },
defaults: {
apiUrl: "//api.default.com/v1",
staticUrl: "//static.default.com",
},
},
});
// default the environment to production
envServiceProvider.set('production')
// run the environment check, so the comprobation is made
// before controllers and services are built
envServiceProvider.check(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the documentation, the 'defaults' block is supposed to be the catch-all area, however in testing it appears that 'development' is actually the catch-all section. Recommend fixing the code to make the 'defaults' block the catch-all area if there are no matches, or update the documentation to note that 'development' is the catch-all area if there are no matches.
The text was updated successfully, but these errors were encountered: