mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-03 02:21:38 +00:00
15 lines
279 B
JavaScript
15 lines
279 B
JavaScript
const path = require('path');
|
|
|
|
function dataPath() {
|
|
if (process.env.ZIGBEE2MQTT_DATA) {
|
|
return process.env.ZIGBEE2MQTT_DATA;
|
|
} else {
|
|
return `${__dirname}/../../data`;
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
path: dataPath(),
|
|
joinPath: (file) => path.join(dataPath(), file)
|
|
}
|