Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = {
- host: "localhost",
- user: "root",
- password: --------,
- database: "addresses",
- port: 1337
- }
- var config = require('./exports');
- var mysql = require('mysql');
- var db = mysql.createConnection({
- host: config.host,
- user: config.user,
- password: config.password,
- database: config.database,
- port: config.port
- });
- db.connect(function(err) {
- if (err) throw err;
- console.log("Connected!");
- });
- module.exports = {db};
Add Comment
Please, Sign In to add comment