mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-06 04:51:44 -07:00
feat: es6+mods
This commit is contained in:
parent
773b64ea30
commit
19c92ed244
19 changed files with 179 additions and 245 deletions
|
@ -1,5 +1,5 @@
|
|||
const axios = require("axios");
|
||||
const fs = require("fs");
|
||||
import axios from "axios";
|
||||
import fs from "node:fs";
|
||||
|
||||
const baseURL = process.env.ZU_CONTROLLER_ENDPOINT || "http://localhost:9993/";
|
||||
|
||||
|
@ -10,7 +10,7 @@ if (process.env.ZU_CONTROLLER_TOKEN) {
|
|||
token = fs.readFileSync("/var/lib/zerotier-one/authtoken.secret", "utf8");
|
||||
}
|
||||
|
||||
module.exports = axios.create({
|
||||
export const api = axios.create({
|
||||
baseURL: baseURL,
|
||||
responseType: "json",
|
||||
headers: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue