We create setup files for 2 environments under server/
datasources.production.json
component-config.development.json
middleware.development.json
component-config.production.json
middleware.production.json
config.development.json
model-config.json
config.production.json
server.js
datasources.development.json
In shell, for instance, set the env: export NODE_ENV=development
.
In node shell, we double check with console.log(process.env.NODE_ENV)
, which print out development
.
Until now, I believe that the NODE_ENV is setup right.
But when running node .
, we have error.
WARNING: Main config file "config.json" is missing
WARNING: Main config file "datasources.json" is missing
WARNING: Main config file "middleware.json" is missing
WARNING: Main config file "component-config.json" is missing
assert.js:90
throw new assert.AssertionError({
^
AssertionError: User is referencing a dataSource that does not exist: "db"
Well, we believe that the environment setting dont work here, then strongloop continue to look for config.json instead of config.development.json.
We are using strongloop v6.0.1 (node v4.4.4).
Many thanks.
--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/4693da92-bd6e-467e-8700-a278d9bd3c96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "LoopbackJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loopbackjs/FzHtC7RGkyo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/CAC%2ByK3es-O9cuRYFAgDXtEg1uFnm2ZESr0%3DxtZhfbBMzmMQWrw%40mail.gmail.com.