mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07: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)
|
|
}
|