From 8b1f046a3fb2a7ad45980f18e01843cb439b41b5 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Thu, 25 Jul 2019 20:49:01 -0700 Subject: [PATCH] Remove config directory --- .gitignore | 12 ------------ build/build.ts | 3 --- config/config-sample.json | 13 ------------- config/ext-sample.js | 34 ---------------------------------- 4 files changed, 62 deletions(-) delete mode 100644 config/config-sample.json delete mode 100644 config/ext-sample.js diff --git a/.gitignore b/.gitignore index 9a7a80a..2ae8b6c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,5 @@ *~ node_modules dist -config/config.json -config/config-ui.json -config/cwmp.key -config/cwmp.crt -config/cwmp.ca-bundle -config/nbi.key -config/nbi.crt -config/nbi.ca-bundle -config/fs.key -config/fs.crt -config/fs.ca-bundle -config/ext bin/.*.ts tools/.*.ts diff --git a/build/build.ts b/build/build.ts index 73619d4..025aff1 100644 --- a/build/build.ts +++ b/build/build.ts @@ -136,7 +136,6 @@ async function init(): Promise { // Create output directory layout fs.mkdirSync(OUTPUT_DIR); fs.mkdirSync(OUTPUT_DIR + "/bin"); - fs.mkdirSync(OUTPUT_DIR + "/config"); fs.mkdirSync(OUTPUT_DIR + "/public"); fs.mkdirSync(OUTPUT_DIR + "/tools"); @@ -172,8 +171,6 @@ async function copyStatic(): Promise { "LICENSE", "README.md", "CHANGELOG.md", - "config/config-sample.json", - "config/ext-sample.js", "public/logo.svg", "public/favicon.png" ]; diff --git a/config/config-sample.json b/config/config-sample.json deleted file mode 100644 index b937a1b..0000000 --- a/config/config-sample.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "MONGODB_CONNECTION_URL" : "mongodb://127.0.0.1/genieacs", - "CWMP_INTERFACE" : "0.0.0.0", - "CWMP_PORT" : 7547, - "NBI_INTERFACE" : "0.0.0.0", - "NBI_PORT" : 7557, - "FS_INTERFACE" : "0.0.0.0", - "FS_PORT" : 7567, - "FS_HOSTNAME" : "", - "UI_INTERFACE" : "0.0.0.0", - "UI_PORT" : 3000, - "UI_JWT_SECRET": "" -} diff --git a/config/ext-sample.js b/config/ext-sample.js deleted file mode 100644 index 9386014..0000000 --- a/config/ext-sample.js +++ /dev/null @@ -1,34 +0,0 @@ -// This is an exmaple GenieACS extension to get the current latitude/longitude -// of the International Space Station. Why, you ask? Because why not. -// To install, copy this file to config/ext/iss.js. - -"use strict"; - -const http = require("http"); - -let cache = null; -let cacheExpire = 0; - -function latlong(args, callback) { - if (Date.now() < cacheExpire) - return callback(null, cache); - - http.get("http://api.open-notify.org/iss-now.json", (res) => { - if (res.statusCode !== 200) - return callback(new Error(`Request failed (status code: ${res.statusCode})`)); - - let rawData = ""; - res.on("data", (chunk) => rawData += chunk); - - res.on("end", () => { - let pos = JSON.parse(rawData)["iss_position"]; - cache = [+pos["latitude"], +pos["longitude"]]; - cacheExpire = Date.now() + 10000; - callback(null, cache); - }); - }).on("error", (err) => { - callback(err); - }); -} - -exports.latlong = latlong;