💻✨ Cursor/VSCode Setup

Ready to dive into the mongodb-airbnb-workshop?
Let’s get your environment up and running—fast, smooth, and with style!


đź“‹ Prerequisites

Before you begin, make sure you have:


🛠️ Step 1: Clone the Repository

  1. Open your terminal.
  2. Clone the repository:
    git clone https://github.com/simonegaiera/mongodb-airbnb-workshop.git
    
  3. Navigate into the project folder:
    cd mongodb-airbnb-workshop
    

Pro Tip:
Once loaded, you’ll see two folders:

  • app (the frontend)
  • server (the backend)

đź§© Step 2: Power Up VSCode

Supercharge your workflow with these extensions:

  • MongoDB for VS Code
  • REST Client

🔥 Step 3: Backend Server Magic

  1. In server, create a .env file from .env.template.
  2. Paste your MongoDB connection string (basic setup):
    PORT=5000
    MONGODB_URI=mongodb+srv://credentials@cluster.vrkei.mongodb.net/?retryWrites=true&w=majority
    DATABASE_NAME=sample_airbnb
    LOG_LEVEL=INFO
    

    Note: If you want to use the full setup (e.g., for vector search and chatbot functionality), ensure you copy the entire .env.template file and adjust the values accordingly.

  3. Open a terminal and run:
    cd server
    npm install
    npm start
    

🎨 Step 4: Web App Setup

  1. In app, create a .env from .env.template:
    WORKSHOP_USER=
    BACKEND_URL=http://localhost:5000
    
  2. Open a new terminal (not the one used in the previous step) and run:
    cd app
    npm install
    npm run dev
    

🎉 You’re Ready!

If you hit a snag, double-check your steps or ask for help.
Now go build something awesome!