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

Lume serve: expected to respect ServerOptions for location #607

Closed
Level8Broccoli opened this issue May 10, 2024 · 2 comments
Closed

Lume serve: expected to respect ServerOptions for location #607

Level8Broccoli opened this issue May 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Level8Broccoli
Copy link

Level8Broccoli commented May 10, 2024

Version

2.1.4

Platform

Linux

What steps will reproduce the bug?

  • Setup the config with a custom port (e.g. lume({server: {port: 1234}}))
  • Using the url() from Lume.Helpers with absolute set to true
  • Run deno task lume --serve

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

I am happy to be corrected if I misunderstand something, but I would have expected the output of Lume.Helpers.url("/test", true) to be http://localhost:1234/test (with the custom port 1234 defined in the config).

What do you see instead?

It outputs http://localhost:3000/test, presumably because of the logic inside lume/core/utils/cli_options.ts:getOptionsFromCli(), where it falls back onto port 3000 when there is nothing passed by CLI.

Additional information

I am new to Deno and Lume and am really liking it. Great job. (This is my first issue I open on a FOSS project on github, so please let me know if I can improve the issue).

@Level8Broccoli Level8Broccoli added the bug Something isn't working label May 10, 2024
@oscarotero
Copy link
Member

Hi. Yes, this is a bug, sorry for the troube.
I can't believe I didn't catch this before, thanks for letting me know!
It will be fixed in the next release of Lume. Meanwhile, you can use the --port argument: deno task lume --serve --port=1234

oscarotero added a commit that referenced this issue May 10, 2024
@oscarotero
Copy link
Member

Fixed in Lume 2.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants