Einige Environment-Variablen angepasst

This commit is contained in:
2023-10-26 10:25:43 +00:00
parent 8bda972061
commit 45b56415b1
4 changed files with 28 additions and 11 deletions

View File

@@ -3,16 +3,16 @@ import * as fs from 'fs'
import { logit, logerror} from'./logit.js'
import { DateTime } from 'luxon'
const API_URL = 'https://api.sensor.community/static/v1/data.json'; // URL to API on 'luftdaten.info'
const SAVE_NAME = 'data/aktdata.json'; // filename for actual data
const SAVE_NAME = '/data/aktdata.json'; // filename for actual data
let LIVE = (process.env.LIVE == "true") || true
let LIVE = process.env.LIVE || 'true'
export let statistics = {};
export const doReadfromAPI = async () => {
logit(`LIVE = ${LIVE}`)
let start = DateTime.now()
let data = []
if (LIVE) {
if (LIVE === 'true') {
logit(`Start Reading from API`)
let body
for(let count = 1; count <= 3; count++) {