Skip to content

Look in to pulling DEV_PORT and DEV_HOST values from .env #1913

@jwoertink

Description

@jwoertink

If you want to specify a custom port or custom host that's different from your config/watch.yml, you can set the DEV_PORT and DEV_HOST env vars; however, these have to be set at the CLI level.

DEV_PORT=3002 lucky dev

Alternatively, you can specify these in your Procfile.dev

web: DEV_PORT=3002 lucky watch

The reason these don't read from the .env is because the watch task will be precompiled in to your bin/ dir, and your .env file isn't read until after this task is created.

The downside to not reading from the .env is that you may want to run on a different port than the rest of your team, so you don't want to add changes that will get added in to git, and you may forget to add it before calling lucky dev and maybe you don't want to make an alias shortcut for yourself.

I've briefly looked in to this issue, and it seems like a rather big refactor, but if someone else wants to look in to this without having to change how Lucky runs or making any breaking changes to the code, I'd be open to a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs investigationA possible bug / better docs needed. Investigate further

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions