Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Enhancement: Create more flexible environment configurations #17

Open
KyleMcMaster opened this issue Apr 25, 2020 · 1 comment
Open
Labels
configuration Repo / project level configuration changes - no functional code changes enhancement New feature or request

Comments

@KyleMcMaster
Copy link
Owner

We could "merge" defaults with local settings if we wanted, by rewriting this file as:

import { Environment } from './environment-types';
import { environment as envSource } from './environment';

export const environment: Environment = {
  ...envSource,
  production: false,
  domain: 'http://localhost:7071',
};

That way we could put the defaults in environment.ts and anything not explicitly overwritten in environment.local.ts would flow through from there.

I've never done this on a project before, but I have wondered if it would be beneficial...

If we did that, there might be better names for the files, like:

environment.local.user.sample.ts - user specific local sample (committed)
environment.local.user.ts - user specific local configuration copied from environment.local.user.sample.ts) (gitignored) environmemt.local.ts` - default local (committed)

Thoughts?

Originally posted by @seangwright in https://github.com/KyleMcMaster/payroll-processor/pull/15/files

@KyleMcMaster
Copy link
Owner Author

Marking this issue as TODO in the future if we need to go move to this design as the settings scale or require this level of flexibility.

@KyleMcMaster KyleMcMaster added configuration Repo / project level configuration changes - no functional code changes enhancement New feature or request labels Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
configuration Repo / project level configuration changes - no functional code changes enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant