mqtt_server/maker.js
2016-06-28 15:02:11 +01:00

21 lines
420 B
JavaScript

/**
*
* User: Martin Donnelly
* Date: 2016-06-28
* Time: 14:50
*
*/
var nano = require('nano')('http://localhost:5984');
var db_name = 'mqtt';
// Clean up the database we created previously
nano.db.destroy(db_name, function() {
// Create a new database
nano.db.create(db_name, function() {
// Specify the database we are going to use
var newDB = nano.use(db_name);
});
});