sourcefuse / loopback4-starter

Loopback 4 starter application. Multi-tenant architecture supported. Authentication, Authorization, Soft deletes, environment vars, Audit logs, included.
MIT License
158 stars 59 forks source link

usage of .env file in README conflicts with application.ts #28

Closed argupta23 closed 5 years ago

argupta23 commented 5 years ago

Describe the bug application.ts points to schema ".env.example" while README suggests renaming ".env.example" to ".env"

dotenv.config(); dotenvExt.load({ schema: '.env.example', errorOnMissing: false, });

Expected behavior Application.ts file not in sync with steps outlined in README

Configure environment You need to configure your environment variables now. Copy .env.example and rename as .env. Now provide values for the keys mentioned there. These are going to be database credentials (created here) and redis credentials (created here). You don't need to provide all the keys though. For some of these (not needed to be secure keys), we have already specified default values in .env.defaults. You can remove them. You will require to fill at least these ones.

It might help to put a console.log statement that prints some of the values.

Thanks

samarpan-b commented 5 years ago

I think you didn't understand how it is used. .env.example is for specifying schema of .env. Read about https://www.npmjs.com/package/dotenv-extended.