generated from fionn/ts-template
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
390 B
27 lines
390 B
import fs from 'fs';
|
|
|
|
export interface WxConfig {
|
|
regions: WxRegion[];
|
|
}
|
|
|
|
export interface WxRegion {
|
|
identifier: string;
|
|
fixes: WxFix[];
|
|
}
|
|
|
|
export interface WxFix {
|
|
name: string;
|
|
lat: number;
|
|
lon: number;
|
|
}
|
|
|
|
export function getConfig(): WxConfig {
|
|
const data = JSON.parse(fs.readFileSync('/opt/wx-config.json').toString());
|
|
|
|
return data;
|
|
}
|
|
|
|
export default {
|
|
getConfig,
|
|
}
|