mitxpro-dev / learnjs

Learn JS
https://mitxpro-dev.github.io/learnjs/
MIT License
1 stars 2 forks source link

bug: fix blank page and base URL in prod #40

Closed HudsonGraeme closed 1 year ago

HudsonGraeme commented 1 year ago
Resolves #37 # Description Issue: #37 - [x] Added check for environment to dynamically select base URL # Screenshots
Click here for screenshots N/A
# Notes On localhost, the routing is based at `/`, but on GH pages the routing is based at `/learnjs/`. To allow the app to run both locally and in prod, I added a check for an environment variable automatically set by node at buildtime called `NODE_ENV`. When building in dev mode for local testing, the variable will be automatically set to `development`. When building the project for deployment, it'll automatically populate as `production`.
HudsonGraeme commented 1 year ago

Thanks to @drewpate for finding the issue that caused the blank page! This is based on his fix.

HudsonGraeme commented 1 year ago

:joy: That still didn't work... Troubleshooting now