help me create chinese chess game online using reactjs + tailwind css (no typescript, only js ) in client and server nodejs + socket io. Help me create 2 project client and server
I'll help you create a Chinese Chess (Xiangqi) game with React + Tailwind CSS for the client and Node.js + Socket.io for the server. Let's start by setting up both projects.
npx create-next-app@latest chinese-chess-client
cd chinese-chess-client
npm install socket.io-client
mkdir chinese-chess-server
cd chinese-chess-server
npm init -y
npm install express socket.io uuid
npm install --save-dev nodemon
cd chinese-chess-server
npm run dev
cd chinese-chess-client
npm run dev
http://localhost:3000
to play the game.You can share the room ID with another player to start a game. The first player will be red (moves first) and the second player will be black.
Please make sure to add the following environment variable to your project: