SHARE
TWEET

Untitled

a guest Apr 27th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var mysql = require('mysql');
  2. var config = require('./config');
  3.  
  4. var options = {
  5.     user: config.get('MYSQL_USER'),
  6.     password: config.get('MYSQL_PASSWORD'),
  7.     database: 'booking'
  8. };
  9.  
  10. /*
  11. if (config.get('INSTANCE_CONNECTION_NAME') && config.get('NODE_ENV') === 'production') {
  12.     options.socketPath = 'cloudsql/' + config.get('INSTANCE_CONNECTION_NAME');
  13. }*/
  14.  
  15.  
  16. var connection = mysql.createConnection(options);
  17.  
  18. module.exports = connection;
  19. exports.connection = connection;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top