- Looking for the admin guide? Check the wiki.
Gambit Admin is a Node.js server and React client app, providing a Gambit web interface for DoSomething staff.
Using https://github.com/mars/heroku-cra-node as an example, this repo is composed of two npm projects, the backend server and the frontend UI, with two
package.jsonfor Node server & Heroku deploy
heroku-postbuildscript compiles the webpack bundle during deploy
react-ui/node_modules/to optimize build time
client/package.jsonfor React web UI
- generated by create-react-app
Run the API Server
In a terminal:
# Initial setup npm install # Start the server npm start
Run the React UI
The React app is configured to proxy backend requests to the local Node server. (See
Note: If the server port changes, the client package.json proxy must be updated as well.
In a separate terminal from the API server, start the UI:
# Always change directory, first cd client/ # Initial setup npm install # Start the server npm start
Respond with a 'yes' when prompted to run the app on another port.
? Something is already running on port 3000. Probably: node server in /Users/sl0THi3B0i/Development/gambit-admin Would you like to run the app on another port instead? (Y/n)