This repository was archived by the owner on Mar 6, 2025. It is now read-only.
forked from itk-dev/infostander_middleware
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
79 lines (73 loc) · 1.55 KB
/
app.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env node
/**
* @file
* This is the main application that uses architect to build the application
* base on plugins.
*/
var path = require('path');
var architect = require("architect");
// Load config file.
var configs = require(__dirname + '/config.json');
// Configure the plugins.
var config = [
{
"packagePath": "./plugins/logger",
"logs": configs.logs
},
{
"packagePath": "./plugins/jobs"
},
{
"packagePath": "./plugins/server",
"port": configs.port,
"path": path.join(__dirname, 'public')
},
{
"packagePath": "./plugins/admin",
"secret": configs.secret
},
{
"packagePath": "./plugins/cache",
"config": configs.cache
},
{
"packagePath": "./plugins/apikeys",
"file": __dirname + '/' + configs.apikeys
},
{
"packagePath": "./plugins/socket",
"secret": configs.secret
},
{
"packagePath": "./plugins/auth",
"secret": configs.secret,
"admin": configs.admin
},
{
"packagePath": "./plugins/client"
},
{
"packagePath": "./plugins/screen"
},
{
"packagePath": "./plugins/channel"
},
{
"packagePath": "./plugins/api",
"secret": configs.secret
},
{
"packagePath": "./plugins/dashboard",
"htpasswd": configs.dashboard.htpasswd,
"blacklist": configs.dashboard.blacklist,
"expire": configs.dashboard.expire
}
];
// User the configuration to start the application.
config = architect.resolveConfig(config, __dirname);
architect.createApp(config, function (err, app) {
"use strict";
if (err) {
throw err;
}
});