Skip to content

Vansh-Bh/hangman

Repository files navigation

Hangman

Welcome to the Hangman Game Application! This project consists of a Flutter application and an Express.js server that communicates using Socket.io and MongoDB.

Prerequisites

Before you begin, ensure you have the following installed on your machine:

Server Setup

  1. Clone the Repository

    git clone https://github.com/Vansh-Bh/hangman.git
    cd server
  2. Install Dependencies using npm install

  3. Set Up MongoDB Atlas
    You can create a free tier MongoDB deployment on MongoDB Atlas to store and manage your data.

    • Create a MongoDB Atlas Account
      Go to MongoDB Atlas and create a free account.

    • Create a Cluster
      After creating your account, follow the instructions to create a new cluster. This will be your MongoDB database in the cloud.

    • Get Your Connection String
      Once your cluster is created, click on "Connect", select "Connect your application", and copy the connection string.

    • Configure MongoDB Connection
      Ensure your MongoDB connection string is correctly set up in the server code. Modify the DB variable in server.js with your connection string:

      const DB = "mongodb+srv://<username>:<password>@<cluster-url>/hangman?retryWrites=true&w=majority";
  4. Run npm start to start the server

Client Setup

  1. Make sure your shell is in this directory

  2. Install flutter dependencies using flutter pub get

  3. Run the flutter app with flutter run

Make sure to update the http://localhost:3000 with your local ip on which the server is running on in this File

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published