Skip to content

Conversation

empmud
Copy link

@empmud empmud commented Jan 21, 2021

No description provided.

Copy link
Member

@seanmakesgames seanmakesgames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together!

const app = express()
const port = 1337
const debug = true
const proxy = debug
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if this wasn't on by default, otherwise how would we have found #111 -

Copy link
Author

@empmud empmud Jan 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only enabled when debug is enabled and when the window.location is not hackmud.com.

If we want debug and proxy to be configurable, it probably makes sense to extract them to a config file/envvars/cmdline flags before making them default false.

What's the most common way to provide config to NodeJS apps? I'll implement whichever is more familiar. (I change the default port too, so it'll be handy)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a handful of options. Here are a few:

  1. modifying package.json (and reading config out of there)
  2. new .json file in the root
  3. new config.js file that is referenced in the file via package require (allows for programmatic stuff to happen more than pure key-values)

I think we should probably do 2. for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants