Einige Environment-Variablen angepasst
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user