json-server icon indicating copy to clipboard operation
json-server copied to clipboard

[Feature Request] - Expose cli options to Module

Open samuelcolburn opened this issue 7 years ago • 0 comments

Currently the module version lacks a lot of the features and options available to the cli version. Recreating things like the nice console logs, or adding a delay require installing your own chalk or connect-pause dependencies, and effectively re-writing the a lot of the src/cli//run.js logic.

I think it would be great if that logic was exposed to both versions so that if we need/want to use the module version we aren't stuck re-writing the same logic and adding the same dependencies.

Looking at the source code I don't think it would be too unreasonable to do with non-breaking changes (essentially move some of the functions defined in run.js like createApp and start into /server and expose them as exports).

samuelcolburn avatar Jul 22 '19 18:07 samuelcolburn