Addresses #111 by adding a local API proxy#112
Addresses #111 by adding a local API proxy#112empmud wants to merge 2 commits intocomcode-org:mainfrom
Conversation
seanmakesgames
left a comment
There was a problem hiding this comment.
Thanks for putting this together!
| const app = express() | ||
| const port = 1337 | ||
| const debug = true | ||
| const proxy = debug |
There was a problem hiding this comment.
Would be nice if this wasn't on by default, otherwise how would we have found #111 -
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
There are a handful of options. Here are a few:
- modifying package.json (and reading config out of there)
- new .json file in the root
- 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.
No description provided.