Skip to content

Instantly share code, notes, and snippets.

View franck34's full-sized avatar

franck34 franck34

  • France/Montpellier
View GitHub Profile
@franck34
franck34 / gist:c08eca6379c60f6694468341a7442e45
Created February 2, 2019 21:43
nodejs async await for noob like me
const { promisify } = require("util");
function Foo() {
this.one = promisify(
function(value, callback) {
setTimeout(() => {
console.log("one", value);
callback(null, true);
}, 500);