Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatic API: configFile option is not honored #115

Closed
kenrick95 opened this issue Apr 29, 2019 · 2 comments · Fixed by lwsjs/lws#10
Closed

Programmatic API: configFile option is not honored #115

kenrick95 opened this issue Apr 29, 2019 · 2 comments · Fixed by lwsjs/lws#10

Comments

@kenrick95
Copy link

When using the programmatic API of this package, I followed the example and documentation from the wiki.

On that page, it listed the option configFile as a parameter to LocalWebServer.listen()

So, I expect this piece of codes to work as intended (options are read from configFile):

const LocalWebServer = require('local-web-server')
const localWebServer = new LocalWebServer()
const server = localWebServer.listen({
  configFile: './path-to-file/lws.config.js'
})

server.close() 

But unfortunately, the config file is never read. I checked the source code in lws package and indeed, the config is only used at lib/command/serve.js which I believe is only invoked in the CLI application use case.

@75lb
Copy link
Member

75lb commented Apr 29, 2019

interesting, thanks for reporting this.. yes, the configFile option should be honoured from both API and CLI use cases. Will look into this soon - thanks for the PR.

@75lb
Copy link
Member

75lb commented Jun 9, 2019

Fixed and released in v3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants