diff --git a/.gitignore b/.gitignore index f271986e1..7f658ecf5 100644 --- a/.gitignore +++ b/.gitignore @@ -57,4 +57,5 @@ typings/ # dotenv environment variables file .env -package-lock.json +# data +data/database.db \ No newline at end of file diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/index.js b/index.js index 3d68287c0..786b1c5ec 100644 --- a/index.js +++ b/index.js @@ -41,7 +41,13 @@ const args = parser.parseArgs(); // Setup client console.log(`Connecting to MQTT server at ${args.mqtt}`) const client = mqtt.connect(args.mqtt) -const shepherd = new ZShepherd(args.device, {net: {panId: 0x1a62}}); +const shepherd = new ZShepherd( + args.device, + { + net: {panId: 0x1a62}, + dbPath: `${__dirname}/data/database.db` + } +); // Register callbacks client.on('connect', handleConnect);