lumeland / lume

🔥 Static site generator for Deno 🦕
https://lume.land
MIT License
1.85k stars 85 forks source link

Lume serve: expected to respect ServerOptions for location #607

Closed Level8Broccoli closed 4 months ago

Level8Broccoli commented 4 months ago

Version

2.1.4

Platform

Linux

What steps will reproduce the bug?

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).

oscarotero commented 4 months ago

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 commented 4 months ago

Fixed in Lume 2.2.0.