Skip to content

Instantly share code, notes, and snippets.

@sirramongabriel
Created March 22, 2018 13:32
Show Gist options
  • Save sirramongabriel/bb0136ff96aee6bf039b9b8c0e8819aa to your computer and use it in GitHub Desktop.
Save sirramongabriel/bb0136ff96aee6bf039b9b8c0e8819aa to your computer and use it in GitHub Desktop.
var Mapper = require('mapper');
var conn = { user: 'grace', password: 'secret', database: 'app_dev' };
// set verbose flag to trace SQL
// set strict to be warned of invalid columns in JSON objects
Mapper.connect(conn, {verbose: true, strict: false});
// what triggers the connection from my html site? Do I need to wrap this inside an event listener (i.e. on document load)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment