Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
divu-nginx-async-micro
const sleep = require("then-sleep");
var rn = require("random-number");
module.exports = async (req, res) => {
await sleep(10000);
const generator = rn.generator({
min: 0,
max: 1000,
integer: true
});
const randomNumber = generator().toString();
res.end(`${randomNumber}\n`);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment