-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
48 lines (36 loc) · 1.44 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
*
* Package: desktopcgi-bridge-express
* Author: Ganesh B
* Description: Nodejs npm module to Express based bridge for Desktop-CGI application serving. Serves files, proxy, manages processes, and manages concurrency
* Install: npm i desktopcgi-bridge-express --save
* Github: https://github.com/desktop-cgi/bridge-express
* npmjs Link: https://www.npmjs.com/package/desktopcgi-bridge-express
* File: .js
* File Description:
*
*
*/
/* eslint no-console: 0 */
'use strict';
// async function genCgiRoutes() {
// let cgifiles = require("./src/recursive/cgifiles");
// return await cgifiles(__dirname, { cgifiles: require("./www/configs/sample-cgifiles.json") }, {});
// }
// genCgiRoutes().then(function (app) {
// app.listen(8000, "127.0.0.1");
// }.bind()).catch((e) => console.log(e));
async function genProxyRoutes() {
let proxies = require("./src/recursive/proxies");
return await proxies(__dirname, { ...require("./www/configs/sample.proxies.json") }, {});
}
genProxyRoutes().then(function (app) {
console.log(app);
}.bind()).catch((e) => console.log(e));
// async function genProcessesRoutes() {
// let processes = require("./src/recursive/processes");
// return await processes(__dirname, { proxies: require("./www/configs/sample-processes.json") }, {});
// }
// genProcessesRoutes().then(function (procs) {
//
// }.bind()).catch((e) => console.log(e));