This is a full-stack Tic-Tac-Toe game application built with React.js (frontend) and Node.js (backend).
-
Clone the repository:
git clone https://github.com/iamdineshbasnet/tic-tac-toe-extended.git cd tic-tac-toe-extended -
Install dependencies for both client and server:
# For Server cd server npm install # For Client cd client npm install
-
Environment Setup:
Client
Create a .env file in the client directory with the following content:
REACT_APP_BASE_URL= REACT_APP_VERSION=
Server
Create a .env file in the server directory with the following content:
# PORT=3000 # MONGO_URI= # ALLOWED_HOST= # ACCESS_TOKEN_SECRET= # REFRESH_TOKEN_SECRET= # VERSION=
generate a secret for
ACCESS_TOKEN_SECRETandREFRESH_TOKEN_SECRETusing the following command:node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
-
Start the Node.js server:
cd server npm run dev -
Start the React.js app:
cd client npm run dev
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.