Deploying to the web
Get your project live for the whole world to see
⏱ Est. ~9 min
01 · Read
Everything you've built so far runs on localhost — your own computer. Nobody else can see it. That changes now.
Deploying means putting your application on a server that's online 24/7, so anyone with the URL can use it. It sounds complicated, but modern platforms make it ridiculously simple. You push your code, they handle the rest.
We'll use Render because it has a generous free tier, works directly with GitHub, and requires zero server setup. Your app will be live in minutes.
💡 Picture thislocalhost is like cooking in your kitchen — only your family can eat the food. Deploying is like opening a restaurant: anyone from anywhere can walk in. Render is like a ready-made restaurant space with a kitchen, tables, and an address — you just bring the food (your code).
02 · Step-through
Steps to deploy to Render (free tier). Follow them in order and you'll have a live URL in about 10 minutes.
1. Push to GitHub
Make sure your project is committed and pushed to a GitHub repository. Render pulls your code directly from GitHub, so everything needs to be up to date.
2. Sign up at render.com
Use 'Sign up with GitHub' for the easiest setup. It lets Render access your repos without extra configuration.
3. Create a new Web Service
Click 'New' → 'Web Service' to connect your GitHub repo. Render will ask which repo to deploy.
4. Configure
Build command: npm install. Start command: node app.js. These tell Render how to set up and run your app. The build command installs dependencies; the start command launches your server.
5. Add environment variables
Copy your .env values into Render's environment settings. Never commit them to git — enter them directly in the Render dashboard. Add each key-value pair separately.
6. Deploy!
Click Deploy and wait for the build. You'll see logs streaming in real time. When the status turns green, your app is live at a .onrender.com URL — share it with anyone.
03 · Real-machine exercise
Use this checklist to deploy your project. Take your time — the first deploy always takes a few tries, and that's totally normal.
04 · Quiz
When you push code to GitHub, what does a deployment platform like Render do?
- Email you a zip file of your project
- Create a new GitHub repository
- Automatically pull your code, build it, and run it on their servers
- Download your code to your local machine
05 · Fill in the blank
When deploying a Node.js app, the platform needs to know the _____ command to launch your server (e.g. 'node app.js').
06 · Read
Take a moment to appreciate what just happened. People on the other side of the world can now type your URL and use something you built. You wrote the code, you deployed it, and it's running on a real server right now.
This is the moment most engineers remember forever — the first time their project went live.
07 · Quiz
Your .env file contains a database password and API keys. How should you handle these values when deploying to Render?
- Commit the .env file to git so Render can read it
- Paste them into your source code before deploying
- Email them to Render support
- Enter them in Render's environment variables settings — never commit them to git
08 · Fill in the blank
When deploying a Node.js app on Render, the _____ command (e.g. 'npm install') tells the platform how to set up your project's dependencies.
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.