DEV Community

Muhammad Huzaifa
Muhammad Huzaifa

Posted on • Edited on

What Version Is Running in Production Right Now?

What Version Is Running in Production Right Now?

awkward silence

We've all been there.

It's 2 AM. Production is down. Your manager pings you on Slack:
"What changed in the last deployment?"

And you... don't know.

The Developer Treasure Hunt πŸ—ΊοΈ
So you start the familiar dance:
SSH into the server, check logs
Open Git history, scroll endlessly

Ping the DevOps team (who's also asleep)

Compare timestamps across 3 different tools
Cross-reference deployment records
Maybe find the answer 20 minutes later
This shouldn't be a detective game in 2024.

The Solution: deploy-info πŸ“¦

I got tired of this workflow, so I built deploy-info β€” a zero-config NPM package that gives you instant deployment visibility.

What You Get

import { getDeployInfo } from 'deploy-info';

const info = getDeployInfo();

console.log(info);

Output:
{
"deploymentTime": "2024-12-17T14:23:45Z",
"version": "2.3.1",
"deploymentCount": 47,
"lastCommit": {
"hash": "a3f2b1c",
"author": "jane.doe@company.com",
"message": "Fix authentication bug",
"timestamp": "2024-12-17T13:15:22Z"
}
}

Real-World Use Cases

  1. Health Check Endpoints
    app.get('/health', (req, res) => {
    res.json({
    status: 'ok',
    ...getDeployInfo()
    });
    });

  2. Error Tracking Integration
    Sentry.init({
    release: getDeployInfo().version,
    environment: process.env.NODE_ENV
    });

  3. Production Debugging
    logger.info('Request processed', {
    deployment: getDeployInfo(),
    requestId: req.id
    });

Why It Works
βœ… Zero dependencies β€” No bloat
βœ… No configuration β€” Works out of the box
βœ… Automatic extraction β€” Reads from package.json and Git
βœ… TypeScript support β€” Fully typed
βœ… MIT licensed β€” Use it anywhere
Installation
npm install deploy-info

That's it. No config files. No environment variables. No external services.

The Numbers
316 teams shipped with deploy-info this week. Zero setup time. Zero debugging headaches.

Try It
NPM: npmjs.com/package/deploy-info

GitHub: github.com/huzaifa-io/deploy-info

If this solves your problem, drop a ⭐ on GitHub!

What's your production debugging horror story? Drop it in the comments πŸ‘‡

Tags: #node #javascript #devops #webdev #opensource #productivity

Top comments (0)