local-web-server icon indicating copy to clipboard operation
local-web-server copied to clipboard

Override config file arguments from CLI

Open ghenadiibatalski opened this issue 2 years ago • 1 comments

Hello and thank you for this wonderful product! I'm facing a problem, that i need to override at least the --directory from a command line even if this is already configured via the config file. Could you please make a CLI arguments a higher precedence over the config file?

Thanks and kind regards, Gena

ghenadiibatalski avatar Jul 28 '22 09:07 ghenadiibatalski

Hi, yes this looks like a bug.. if you set the --config flag you can inspect the config that ws is using, e.g.

$ ws --port 8030 --config
{
  port: 8030,
  stack: MiddlewareStack(3) [ LwsAuth, Static ],
  view: CliView {}
}

Do you find that the --config output is correct but is not being respected? I imagine this is a quick fix, will look into it..

75lb avatar Jul 31 '22 16:07 75lb