Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Make port and dir flag available #191

Closed
wants to merge 1 commit into from

Conversation

otofune
Copy link

@otofune otofune commented May 30, 2019

- Summary

Same as title.

  • Fix type of 'dir' option
  • Use flags.dir / flags.port in application

I wanted to change port & dir. I found its option in netlify cli, but it didn't works.

- Test plan

  1. Use --dir= and --port= option in your local environment without netlify.toml.
  2. With --dir= option, it's successful if you can't see the message from L198.
  3. WIth --port= option, it's successful if you can see Server now ready on http://localhost:${your port} message.

- Description for the changelog

Make port and dir flag available

- A picture of a cute animal (not mandatory but encouraged)

cat-typing

- Fix type of 'dir' option
- Use flags.dir / flags.port in application
@mikhuang
Copy link

This is very cool and very useful. However, this doesn't seem to work when both command and dir are set. I had to alter the object sent to serverSettings on line 187 as follows:

let settings = await serverSettings(Object.assign({}, config.dev, {
      command: flags.command,
      port: flags.port,
      functions: flags.functions,
      publish: flags.dir,
    }));

mikhuang added a commit to Standard-Cognition/netlify-dev-plugin that referenced this pull request May 30, 2019
@jack-sf
Copy link

jack-sf commented Jul 3, 2019

@sw-yx can we merge this? ;) This looks very good.

@swyxio
Copy link
Contributor

swyxio commented Jul 3, 2019

i dont maintain netlify dev anymore. @RaeesBhatti

@otofune
Copy link
Author

otofune commented Jul 11, 2019

#205

@otofune otofune closed this Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants