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

Is the server port options taken in account from the configuration file? #704

Closed
e-roux opened this issue Dec 7, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@e-roux
Copy link

e-roux commented Dec 7, 2024

Version

2.4.2

Platform

Darwin

What steps will reproduce the bug?

After bootstrapping a site with deno run -A https://lume.land/init.ts with the configuration:

import lume from "lume/mod.ts";

const site = lume({
  server: {
    port: 8000,
  },
});

export default site;

the site is accessible on port 3000 but not 8000

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

always

What is the expected behavior?

Task serve deno task lume -s
Task lume echo "import 'lume/cli.ts'" | deno run -A - "-s"
Loading config file file:///private/tmp/lumi/_config.ts
🍾 Site built into ./_site
  0 files generated in 0.00 seconds
  Server started at:
  http://localhost:8000/ (local)
  http://192.168.178.30:8000/ (network)

What do you see instead?

Task serve deno task lume -s
Task lume echo "import 'lume/cli.ts'" | deno run -A - "-s"
Loading config file file:///private/tmp/lumi/_config.ts
🍾 Site built into ./_site
  0 files generated in 0.00 seconds
  Server started at:
  http://localhost:3000/ (local)
  http://192.168.178.30:3000/ (network)

Additional information

The port is taken in account when passed to the command line

@e-roux e-roux added the bug Something isn't working label Dec 7, 2024
@oscarotero
Copy link
Member

Sorry, this is a bug. Seems that the default url for server mode (localhost:3000) overrides the port. I'll fix it in the next version.
Meanwhile, you can use --port flag (serve deno task lume -s --port=8000)

@e-roux
Copy link
Author

e-roux commented Dec 7, 2024

thanks for the quick reponse. Works with the flag passed to deno task serve

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