Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mysql = require('mysql');
- var config = require('./config');
- var options = {
- user: config.get('MYSQL_USER'),
- password: config.get('MYSQL_PASSWORD'),
- database: 'booking'
- };
- /*
- if (config.get('INSTANCE_CONNECTION_NAME') && config.get('NODE_ENV') === 'production') {
- options.socketPath = 'cloudsql/' + config.get('INSTANCE_CONNECTION_NAME');
- }*/
- var connection = mysql.createConnection(options);
- module.exports = connection;
- exports.connection = connection;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement