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

Enhancement: Create more flexible environment configurations #17

Description

@KyleMcMaster

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationRepo / project level configuration changes - no functional code changesenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions