You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, I wanna use nginx and proxy both API and Web, but currently I need change configurations in webpack and some other places to do that, but I only want:
api -> localhost:3001 -> proxy -> api.test-domain.com:80
web -> localhost:3000 -> proxy -> test-domain.com
But when I try to do that without any changes, my browser start try do request to localhost:3000 / localhost:3001
The text was updated successfully, but these errors were encountered:
@avengerweb First off, thanks for giving the project a try!
The following environment variables should be of interest to tweak what is served where:
API_PORT - Port to serve the API on (default: 3001)
API_URI - Full URI to the API (default: http://localhost:$API_PORT/graphql)
PIPELINE_URI - Full URI to the pipeline, which serves game resources (default: http://localhost:$API_PORT/pipeline)
WEB_PORT - Port to serve the web app on during development (default: 3000)
The defaults for these environment variables are in .envrc-sample. To make changes, copy .envrc-sample to .envrc and source the file. Alternatively, simply export-ing the env variables for the user running the processes should suffice.
The API is a live process, so needs to be started using npm start. If you plan on making changes to the web client for Spelunker, set WEB_PORT to whichever port you want to run the development webpack server on and use npm run start. If you however plan to host it somewhere statically, use npm run build.
Make sure to restart these processes (or make a new static build) if you make any changes to environment variables.
For example, I wanna use nginx and proxy both API and Web, but currently I need change configurations in webpack and some other places to do that, but I only want:
api -> localhost:3001 -> proxy -> api.test-domain.com:80
web -> localhost:3000 -> proxy -> test-domain.com
But when I try to do that without any changes, my browser start try do request to localhost:3000 / localhost:3001
The text was updated successfully, but these errors were encountered: