refactor: squash commits

This commit is contained in:
dec0dOS 2021-03-21 22:25:13 +03:00
parent 63ebcb5915
commit 1e6e237aa3
107 changed files with 20077 additions and 0 deletions

View file

@ -0,0 +1,19 @@
const axios = require("axios");
const fs = require("fs");
const baseURL = process.env.ZU_CONTROLLER_ENDPOINT || "http://localhost:9993/";
var token;
if (process.env.ZU_CONTROLLER_TOKEN) {
token = process.env.ZU_CONTROLLER_TOKEN;
} else {
token = fs.readFileSync("/var/lib/zerotier-one/authtoken.secret", "utf8");
}
module.exports = axios.create({
baseURL: baseURL,
responseType: "json",
headers: {
"X-ZT1-Auth": token,
},
});