diff --git a/nodejs/models/rc_db.js b/nodejs/models/rc_db.js new file mode 100644 index 0000000..32f5929 --- /dev/null +++ b/nodejs/models/rc_db.js @@ -0,0 +1,17 @@ +var mysql = require('mysql'); +var config = require('../config'); + +var connection = mysql.createConnection({ + host : config.mysql_host, + user : config.mysql_user, + password : config.mysql_secret, + database : config.mysql_database +}); + +connection.connect(); + +var RC = function () { + connection.query('CREATE TABLE IF NOT EXISTS rc_switches', function(err, rows, fields) { + if (err) throw err; + }); +}; \ No newline at end of file