This is a multiplayer web application where players can submit Unicode characters to a 10x10 grid, with real-time state management and socket connections. The application consists of two parts:
- Client: Frontend built with React and Tailwind CSS.
- Server: Backend powered by Node.js and Express, with MongoDB as the database.
- Node.js: Install Node.js (version >= 18) from Node.js downloads.
- MongoDB: You need a MongoDB instance. You can either run it locally or use a cloud service like MongoDB Atlas.
- Git: Make sure Git is installed.
git clone https://github.com/builtbysuraj/multiplayer-web.git
cd multiplayer-web
The client folder contains the React frontend.
-
Navigate to the client folder.
cd client
-
Install dependencies.
npm install
-
Start the React development server.
npm run dev
The client should now be running at http://localhost:5173
.
The server folder contains the Express backend.
-
Navigate to the server folder.
cd server
-
Create an
.env
file in the server folder based on the.env.sample
file (details below). -
Install dependencies.
npm install
-
Start the server.
npm run dev
The server should now be running at http://localhost:3000
.
MONGODB_URL= # You need to add your MongoDB connection string here
MONGODB_URL
: Add your MongoDB connection string (from MongoDB Atlas or local instance).