Skip to content

Instantly share code, notes, and snippets.

View neonerd's full-sized avatar

Andrej Sýkora neonerd

View GitHub Profile
const mssql = require("mssql")
const puresql = require("puresql")
// Load our queries
const queries = puresql.loadQueries("user.sql")
// Create a connection the adapter will use
mssql.connect('mssql://user:password@host/database')
.then(() => {
// Create the adapter
@neonerd
neonerd / wait.js
Created March 24, 2017 17:29
Async / await wait
function wait (s) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(true), s)
})
}
async function main () {
console.log('start now')
await wait(2000)
console.log('end after 2 seconds')

Keybase proof

I hereby claim:

  • I am neonerd on github.
  • I am neonerd (https://keybase.io/neonerd) on keybase.
  • I have a public key whose fingerprint is 48C8 1EE3 E41D 68A3 3C69 CCE5 5953 032C BD07 F465

To claim this, I am signing this object: