Skip to content

Instantly share code, notes, and snippets.

@Olegas
Last active June 4, 2019 22:10
Show Gist options
  • Save Olegas/3f6a52464e382dc8f860369af762ea06 to your computer and use it in GitHub Desktop.
Save Olegas/3f6a52464e382dc8f860369af762ea06 to your computer and use it in GitHub Desktop.
Symbol?
// router.js
app.get('/', (req, res) => {
// generate rewuest uuid
// assign it to something (?)
// kick in some app logic
});
// db.js
async function getAfromB() {
const result = await driver.oneOrNone('SELECT a FROM b');
logger.log(`db time elapsed: ${duration}`);
}
// external_api.js
async function callExternalProc() {
const result = await request(....);
logger.log(`api time elapsed: ${duration}`);
}
// logger.js
functin log(str) {
console.log(`UUID: ${REQUEST_UUID}, ${str}`)ж
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment