Why this matters ?
Every small (solo) dev hits the same wall: “Okay, my app works locally… but how do I get it online today?”
In this issue, you’ll deploy a live Node.js API — with GitHub CI/CD, secrets, and monitoring — all without touching a single server.

Table of Contents

🚀 What you’ll build

A tiny REST API that returns random developer quotes.
We’ll deploy it using Vercel with automatic CI/CD from GitHub.

import express from "express";
const app = express();

const quotes = [
  "Simplicity scales.",
  "Automate what hurts.",
  "You don’t need Kubernetes for your portfolio site."
];

app.get("/", (req, res) => res.json({
  quote: quotes[Math.floor(Math.random() * quotes.length)]
}));

app.listen(3000, () => console.log("Server running on port 3000"));

That’s it — one file, one endpoint.

⚙️ Step 1: Create your repo

  • Create a new folder and add app.js.

  • Run:

npm init -y
npm install express
  • Update your package.json:

{
  "type": "module",
  "scripts": {
    "start": "node app.js"
  }
}
  • Add a .gitignore file:

node_modules
.env
  • Push it to a new GitHub repository.

🌐 Step 2: Deploy with Vercel

  1. Go to vercel.com.

  2. Click “New Project → Import Git Repository.”

  3. Select the repo you just created.

  4. Vercel will auto-detect it’s a Node app.

  5. Click Deploy.

That’s it.
Your live API is available instantly.

🔁 Step 3: Automatic CI/CD

By default, Vercel connects to your GitHub repo.
Every time you push to main, it rebuilds and redeploys automatically.

Update your README.md:

![Vercel Deploy](https://vercel.com/button)

🔒 Step 4: Environment variables

Let’s make it feel more real.
Go to Project Settings → Environment Variables in Vercel, and add:

API_KEY: SECRET

Then, in your code:

app.get("/secure", (req, res) => {
  res.json({ key: process.env.API_KEY });
});

Redeploy, and your new endpoint will have access to secrets safely stored on Vercel.

🔍 Step 5: Logs & monitoring

Vercel includes built-in request logs and error tracking — no setup needed.
Go to the Logs tab on your project dashboard and you’ll see all recent requests and console output.

🧩 That’s it, you just did DevOps

In about 15-20 minutes, you:

Built and deployed a working API
Set up CI/CD from GitHub
Added environment variables and monitoring
Never touched a server or wrote a YAML file

This is “no-DevOps DevOps”.

Till next time,

IndieDevOps

Keep Reading

No posts found