Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Allow serving multiple ncdc configs from 1 serve command #369

Closed
tamj0rd2 opened this issue Aug 12, 2020 · 2 comments
Closed

Allow serving multiple ncdc configs from 1 serve command #369

tamj0rd2 opened this issue Aug 12, 2020 · 2 comments
Labels
breaking change enhancement New feature or request

Comments

@tamj0rd2
Copy link
Owner

tamj0rd2 commented Aug 12, 2020

Summary

You should be able to provide multiple config paths to the serve command and run the fakes at once.

Right now, if you have multiple ncdc config files, you have to run the serve command many times. The resource drain can be especially bad when using watch mode, because you could have the typescript compiler running 5 (or as many config files you have) times in the background.

I think this will get done as part of the programmatic API/config file thing. But here's an intermediary solution:

Change the command to be like: ncdc serve ./path/to/config1.yml ./path/to/config2.yml 4000 -c mytsconfig.json

Outcome:

  • ./path/to/config1.yml will be served on port 4000
  • ./path/to/config2.yml will be served on port 4001
  • The typescript compiler will only need to be invoked once, using the single specified tsconfig.json

Because this is only an intermediary change, I think auto increment of the port is good enough.

@tamj0rd2 tamj0rd2 added the enhancement New feature or request label Aug 12, 2020
@tamj0rd2
Copy link
Owner Author

tamj0rd2 added a commit that referenced this issue Aug 16, 2020
tamj0rd2 added a commit that referenced this issue Aug 16, 2020
tamj0rd2 added a commit that referenced this issue Aug 18, 2020
@tamj0rd2 tamj0rd2 mentioned this issue Aug 31, 2020
3 tasks
@tamj0rd2
Copy link
Owner Author

tamj0rd2 commented Jan 21, 2021

Decided to just tackle the programmatic API instead #267

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant