medic / cht-user-management

GNU Affero General Public License v3.0
3 stars 1 forks source link

Add .env vars so dev instance can be anywhere, output correct IP for dev instance #15

Closed mrjones-plip closed 7 months ago

mrjones-plip commented 7 months ago

This PR keeps the default behavior for when you run npm run dev so that your $localhost in the login drop down translates to http://localhost:5988, but adds three new env vars:

This also adds a debug output in stdout when you login of either:

You can not login when the IP is 0.0.0.0 so I changed it to allow you to specify which interface it binds to (see INTERFACE in readme) and strongly encourage the user to change this to 127.0.0.1 in a dev environment. we only print out one line about which URL to use so it should set the dev up for more success on first use:

3:55:20 PM - Found 0 errors. Watching for file changes.
Using configuration: chis-ke
Server is listening on http://127.0.0.1:3000

Finally, it changes the drop down from $localhost to Development Instance (CHT_DEV_URL_PORT) as the localhost may not be local any more ;)

per #14