Tic Tac Toe Gobbler is a variation of a classic Tic Tac Toe Game (Gobblet Gobblers) The frontend is implemented in ReactJs - Demo Available below
To deploy a frontend-only React app, use the static-site optimized
- Netlify - https://tic-tac-toe-gobbler.netlify.app/
A combo of two npm projects, the backend server and the frontend UI. So there are two package.json
configs and thereforce two places to run npm
commands:
- Node server:
./package.json
- deployed automatically via heroku/nodejs buildpack
- React UI:
react-ui/package.json
- generated by create-react-app
- deployed via
build
script in the Node server's./package.json
- module cache configured by
cacheDirectories
Includes a minimal Node Cluster implementation to parallelize the single-threaded Node process across the available CPU cores.
Because this app is made of two npm projects, there are two places to run npm
commands:
- Node API server at the root
./
- React UI in
react-ui/
directory.
In a terminal:
# Initial setup
npm install
# Start the server
npm start
npm install package-name --save
The React app is configured to proxy backend requests to the local Node server. (See "proxy"
config)
In a separate terminal from the API server, start the UI:
# Always change directory, first
cd react-ui/
# Initial setup
npm install
# Start the server
npm start
# Always change directory, first
cd react-ui/
npm install package-name --save