Environment Preparation: Codespace/VSCode
💻✨ Codespace/VSCode Setup
Ready to dive into the mongodb-airbnb-workshop?
Let’s get your environment up and running—fast, smooth, and with style!
🚀 Step 1: Launch Your Codespace
- Head to the GitHub repo.
- Click <> Code → Codespace → Create codespace.
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
- In
server
, create a.env
file from.env.template
. - Paste your MongoDB connection string:
MONGODB_URI=mongodb+srv://user:password@cluster.vrkei.mongodb.net/?retryWrites=true&w=majority
- Open a terminal and run:
cd server npm install npm start
- Codespace Only:
In thePORTS
panel, set your port to public for easy access!
🎨 Step 4: Web App Setup
- In
app
, create a.env
from.env.template
:WORKSHOP_USER= BACKEND_URL=http://localhost:5000
- Open a new terminal and run:
cd app npm install npm run dev
- Codespace Only:
- When prompted, click Open in browser.
- Set the port to public in the
PORTS
panel.
🎉 You’re Ready!
If you hit a snag, double-check your steps or ask for help.
Now go build something awesome!