Skip to content

Instantly share code, notes, and snippets.

@nerlihmax
Created April 11, 2020 13:07
Show Gist options
  • Save nerlihmax/2a52492654402ad70a58be67d920ad23 to your computer and use it in GitHub Desktop.
Save nerlihmax/2a52492654402ad70a58be67d920ad23 to your computer and use it in GitHub Desktop.
very-useufull-service
const express = require('express');
const fs = require('fs');
const app = express();
app.get('/version', (req, res) => {
let version = JSON.parse(fs.readFileSync('version.json'));
res.json(version);
});
app.listen(80, () => {});
{
"name": "very-usefull-service",
"version": "1.0.0",
"main": "main.js",
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.17.1"
}
}
{"version": "0.1"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment