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
Health Check Endpoints
app.get('/health', (req, res) => {
res.json({
status: 'ok',
...getDeployInfo()
});
});Error Tracking Integration
Sentry.init({
release: getDeployInfo().version,
environment: process.env.NODE_ENV
});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)