In the previous section, we built our own API server that runs locally and returns HTTP responses to clients. But what happens when you close your laptop? The server stops, and no one can reach it anymore.
For your application to be available to users at any time, it needs to run on a computer that is always on — somewhere in the cloud.
A PaaS (Platform as a Service) is a hosting platform where you can deploy your applications without worrying about the infrastructure behind it. Networking, disk space, uptime, security patches — that is all someone else's problem. You just push your code, and the platform takes care of running it.
There are many PaaS providers for deploying web applications, the most well-known being Netlify, Render, and Vercel. For this section, we will use Render to deploy your Express application and make it available to anyone on the internet — for free.
We need to create a simple server using Express to practice deployments.
<aside> ⌨️
Hands on:
compliments-apipackage.json and all other files.Many PaaS services may run your application on a different port. To support this, read the port number from an environment variable, like this:
const port = process.env.PORT || 3000;
app.listen(port, () => {
console.log(`Compliments server running on <http://localhost>:${port}`);
});
The code above will try to get the port number from process.env.PORT. If it is undefined, it will use the default port 3000.
If you are curious, here is how to set your own port using environment variables:
export PORT=3333
node index.js
# will use 3333 as a port. The env variable will reset after closing the terminal window

Render is a cloud PaaS that lets you deploy web apps directly from a GitHub repo. You connect your repo, Render detects the type of the application (Node.js in your case), builds it, and gives you a public URL. Let’s give it a try.
Create a free account on render.com. Feel free to use any of the authentication options available. After registering, you will be redirected to the dashboard:

Render dashboard with no services running.
Render should detect Node.js automatically. Verify these settings:
| Setting | Value |
|---|---|
| Name | Choose a name (this becomes part of your URL) |
| Language | Node |
| Region | Frankfurt (EU) |
| Branch | main |
| Build Command | npm install |
| Start Command | npm start or node index.js |
| Instance Type | Free |
Click on “Deploy”. Render will now:
npm installnpm starthttps://your-app-name.onrender.comWait for the status to show "Live". This usually takes 1–2 minutes.

Once live, you will be able to see the public assigned URL to your service.

Open your public URL on Render and confirm that the API works.
<aside> 🎉
Congratulations! You have deployed your first application to the internet.
</aside>
What happens on every push?
From now on, every time you push to main, Render will automatically:
npm installThis is Continuous Deployment — no manual steps between pushing code and going live.
<aside> ⌨️
Hands on: Make a small change to the compliments API, push it to GitHub, and confirm that Render shows the updated version.
</aside>
console.log output in the Render dashboard under "Logs".The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0 *https://hackyourfuture.net/*

Built with ❤️ by the HackYourFuture community · Thank you, contributors
Found a mistake or have a suggestion? Let us know in the feedback form.