sockethub 5.0.0-alpha.0 → 5.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/sockethub +2 -29
- package/build.js +21 -0
- package/package.json +15 -65
- package/{dist/defaults.json → sockethub.config.json} +8 -7
- package/tsconfig.json +6 -68
- package/README.md +0 -98
- package/config.json.example +0 -32
- package/coverage/tmp/coverage-15699-1646422276150-0.json +0 -1
- package/dist/bootstrap/init.js +0 -74
- package/dist/bootstrap/init.js.map +0 -1
- package/dist/bootstrap/platforms.js +0 -103
- package/dist/common.js +0 -20
- package/dist/common.js.map +0 -1
- package/dist/config.js +0 -60
- package/dist/config.js.map +0 -1
- package/dist/crypto.js +0 -38
- package/dist/crypto.js.map +0 -1
- package/dist/janitor.js +0 -98
- package/dist/janitor.js.map +0 -1
- package/dist/middleware/create-activity-object.js +0 -19
- package/dist/middleware/create-activity-object.js.map +0 -1
- package/dist/middleware/expand-activity-stream.js +0 -33
- package/dist/middleware/expand-activity-stream.js.map +0 -1
- package/dist/middleware/expand-activity-stream.test.data.js +0 -360
- package/dist/middleware/expand-activity-stream.test.data.js.map +0 -1
- package/dist/middleware/store-credentials.js +0 -19
- package/dist/middleware/store-credentials.js.map +0 -1
- package/dist/middleware/validate.js +0 -77
- package/dist/middleware/validate.js.map +0 -1
- package/dist/middleware/validate.test.data.js +0 -321
- package/dist/middleware/validate.test.data.js.map +0 -1
- package/dist/middleware.js +0 -54
- package/dist/middleware.js.map +0 -1
- package/dist/platform-instance.js +0 -226
- package/dist/platform-instance.js.map +0 -1
- package/dist/platform.js +0 -186
- package/dist/platform.js.map +0 -1
- package/dist/process-manager.js +0 -78
- package/dist/process-manager.js.map +0 -1
- package/dist/routes.js +0 -84
- package/dist/routes.js.map +0 -1
- package/dist/serve.js +0 -102
- package/dist/serve.js.map +0 -1
- package/dist/sockethub-client.js +0 -2604
- package/dist/sockethub-client.js.map +0 -1
- package/dist/sockethub-client.min.js +0 -2
- package/dist/sockethub-client.min.js.LICENSE.txt +0 -24
- package/dist/sockethub.js +0 -130
- package/dist/sockethub.js.map +0 -1
- package/dist/store.js +0 -17
- package/dist/store.js.map +0 -1
- package/src/bootstrap/init.d.ts +0 -8
- package/src/bootstrap/init.ts +0 -91
- package/src/bootstrap/platforms.js +0 -103
- package/src/common.test.ts +0 -54
- package/src/common.ts +0 -14
- package/src/config.d.ts +0 -2
- package/src/config.test.ts +0 -28
- package/src/config.ts +0 -72
- package/src/crypto.d.ts +0 -5
- package/src/crypto.test.ts +0 -41
- package/src/crypto.ts +0 -41
- package/src/defaults.json +0 -32
- package/src/janitor.d.ts +0 -8
- package/src/janitor.ts +0 -89
- package/src/middleware/create-activity-object.test.ts +0 -10
- package/src/middleware/create-activity-object.ts +0 -13
- package/src/middleware/expand-activity-stream.test.data.ts +0 -365
- package/src/middleware/expand-activity-stream.test.ts +0 -78
- package/src/middleware/expand-activity-stream.ts +0 -27
- package/src/middleware/store-credentials.test.ts +0 -72
- package/src/middleware/store-credentials.ts +0 -16
- package/src/middleware/validate.d.ts +0 -1
- package/src/middleware/validate.test.data.ts +0 -320
- package/src/middleware/validate.test.ts +0 -47
- package/src/middleware/validate.ts +0 -49
- package/src/middleware.d.ts +0 -21
- package/src/middleware.test.ts +0 -148
- package/src/middleware.ts +0 -52
- package/src/platform-instance.test.ts +0 -237
- package/src/platform-instance.ts +0 -236
- package/src/platform.ts +0 -189
- package/src/process-manager.ts +0 -64
- package/src/routes.test.ts +0 -100
- package/src/routes.ts +0 -93
- package/src/serve.ts +0 -79
- package/src/sockethub-client.test.ts +0 -235
- package/src/sockethub-client.ts +0 -164
- package/src/sockethub.d.ts +0 -1
- package/src/sockethub.ts +0 -184
- package/src/store.test.ts +0 -26
- package/src/store.ts +0 -17
- package/test/init-suite.js +0 -41
- package/test/sockethub-suite.js +0 -25
- package/views/examples/dummy.ejs +0 -93
- package/views/examples/feeds.ejs +0 -90
- package/views/examples/irc.ejs +0 -239
- package/views/examples/shared.js +0 -72
- package/views/examples/xmpp.ejs +0 -191
- package/views/index.ejs +0 -17
- package/webpack.minified.config.js +0 -14
- package/webpack.normal.config.js +0 -14
package/bin/sockethub
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
const sockethub = new Sockethub();
|
|
5
|
-
|
|
6
|
-
(async () => {
|
|
7
|
-
process.once('uncaughtException', function (err) {
|
|
8
|
-
console.log('UNCAUGHT EXCEPTION');
|
|
9
|
-
// eslint-disable-next-line security-node/detect-crlf
|
|
10
|
-
console.log(err.stack);
|
|
11
|
-
process.exit(1);
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
process.once('SIGTERM', function () {
|
|
15
|
-
console.log('Received TERM signal. Exiting.');
|
|
16
|
-
process.exit(0);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
process.once('SIGINT', function () {
|
|
20
|
-
console.log('Received INT signal. Exiting.');
|
|
21
|
-
process.exit(0);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
process.once('exit', async function () {
|
|
25
|
-
console.log('destroying all platform instances');
|
|
26
|
-
await sockethub.removeAllPlatformInstances();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
sockethub.boot();
|
|
30
|
-
})();
|
|
2
|
+
const sockethubServer = require('@sockethub/server');
|
|
3
|
+
sockethubServer();
|
package/build.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const packageJSON = require('./package.json');
|
|
4
|
+
const moduleList = Object.keys(packageJSON.dependencies);
|
|
5
|
+
|
|
6
|
+
const rx = new RegExp('^@sockethub/platform-', 'i');
|
|
7
|
+
const platforms = [];
|
|
8
|
+
|
|
9
|
+
for (let moduleName of moduleList) {
|
|
10
|
+
if (rx.test(moduleName)) {
|
|
11
|
+
platforms.push(moduleName);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const data = fs.readFileSync(
|
|
16
|
+
'node_modules/@sockethub/server/sockethub.config.example.json', 'utf8');
|
|
17
|
+
const config = JSON.parse(data);
|
|
18
|
+
config.platforms = platforms;
|
|
19
|
+
|
|
20
|
+
fs.writeFileSync(
|
|
21
|
+
'./sockethub.config.json', data);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sockethub",
|
|
3
3
|
"description": "A polyglot messaging service",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Nick Jennings <nick@silverbucket.net>",
|
|
7
7
|
"license": "LGPL-3.0+",
|
|
8
|
-
"main": "
|
|
9
|
-
"bin": "
|
|
8
|
+
"main": "",
|
|
9
|
+
"bin": "bin/sockethub",
|
|
10
10
|
"preferGlobal": true,
|
|
11
11
|
"keywords": [
|
|
12
12
|
"sockethub",
|
|
@@ -30,74 +30,24 @@
|
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "git+https://github.com/sockethub/sockethub.git",
|
|
33
|
-
"directory": "
|
|
33
|
+
"directory": "apps/sockethub"
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://sockethub.org",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"express": "^4.17.1",
|
|
43
|
-
"findup-sync": "^5.0.0",
|
|
44
|
-
"jquery": "^3.4.1",
|
|
45
|
-
"nconf": "^0.11.2",
|
|
46
|
-
"object-hash": "^3.0.0",
|
|
47
|
-
"secure-store-redis": "^1.4.7",
|
|
48
|
-
"socket.io": "^4.0.1",
|
|
49
|
-
"sockethub-platform-dummy": "^3.0.0-alpha.0",
|
|
50
|
-
"sockethub-platform-feeds": "^3.0.0-alpha.0",
|
|
51
|
-
"sockethub-platform-irc": "^4.0.0-alpha.0",
|
|
52
|
-
"sockethub-platform-xmpp": "^5.0.0-alpha.0",
|
|
53
|
-
"sockethub-schemas": "^3.0.0-alpha.0",
|
|
54
|
-
"urijs": "^1.19.2"
|
|
37
|
+
"@sockethub/platform-dummy": "^3.0.0-alpha.3",
|
|
38
|
+
"@sockethub/platform-feeds": "^3.0.0-alpha.3",
|
|
39
|
+
"@sockethub/platform-irc": "^4.0.0-alpha.3",
|
|
40
|
+
"@sockethub/platform-xmpp": "^5.0.0-alpha.3",
|
|
41
|
+
"@sockethub/server": "^5.0.0-alpha.3"
|
|
55
42
|
},
|
|
56
43
|
"scripts": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"start": "DEBUG=sockethub* ./bin/sockethub"
|
|
61
|
-
"dev": "yarn run build && DEBUG=sockethub* ./bin/sockethub --examples",
|
|
62
|
-
"lint": "eslint \"**/*.ts\" ./bin/sockethub",
|
|
63
|
-
"lint:fix": "eslint --fix \"**/*.ts\" ./bin/sockethub",
|
|
64
|
-
"clean": "find . -maxdepth 1 -name dist -exec rm -rv {} +",
|
|
65
|
-
"build": "yarn run clean && yarn run build:server && yarn run build:client",
|
|
66
|
-
"build:server": "tsc && cp ./src/defaults.json ./dist/defaults.json && cp src/bootstrap/platforms.js dist/bootstrap/",
|
|
67
|
-
"build:client": "webpack --config webpack.minified.config.js && webpack --config webpack.normal.config.js"
|
|
44
|
+
"build": "node build.js && test -f sockethub.config.json",
|
|
45
|
+
"clean:deps": "npx rimraf node_modules",
|
|
46
|
+
"dev": "DEBUG=sockethub* ./bin/sockethub --examples -c sockethub.config.json",
|
|
47
|
+
"start": "DEBUG=sockethub* ./bin/sockethub -c sockethub.config.json"
|
|
68
48
|
},
|
|
69
49
|
"engines": {
|
|
70
|
-
"node": ">= 12.
|
|
50
|
+
"node": ">= 12.4.0"
|
|
71
51
|
},
|
|
72
|
-
"
|
|
73
|
-
"@types/body-parser": "1.19.2",
|
|
74
|
-
"@types/chai": "4.3.0",
|
|
75
|
-
"@types/debug": "4.1.7",
|
|
76
|
-
"@types/ejs": "3.1.0",
|
|
77
|
-
"@types/eslint": "8.4.1",
|
|
78
|
-
"@types/express": "4.17.13",
|
|
79
|
-
"@types/jquery": "3.5.13",
|
|
80
|
-
"@types/mocha": "9.1.0",
|
|
81
|
-
"@types/nconf": "0.10.1",
|
|
82
|
-
"@types/node": "17.0.13",
|
|
83
|
-
"@types/object-hash": "2.2.1",
|
|
84
|
-
"@types/proxyquire": "1.3.28",
|
|
85
|
-
"@types/tv4": "1.2.31",
|
|
86
|
-
"@types/urijs": "1.19.18",
|
|
87
|
-
"@typescript-eslint/parser": "5.12.1",
|
|
88
|
-
"c8": "7.11.0",
|
|
89
|
-
"chai": "4.3.6",
|
|
90
|
-
"eslint": "8.9.0",
|
|
91
|
-
"eslint-cli": "1.1.1",
|
|
92
|
-
"eventemitter2": "6.4.5",
|
|
93
|
-
"jaribu": "2.2.3",
|
|
94
|
-
"mocha": "9.2.1",
|
|
95
|
-
"proxyquire": "2.1.3",
|
|
96
|
-
"sinon": "13.0.1",
|
|
97
|
-
"ts-node": "10.5.0",
|
|
98
|
-
"typescript": "4.5.5",
|
|
99
|
-
"webpack": "5.69.1",
|
|
100
|
-
"webpack-cli": "4.9.2"
|
|
101
|
-
},
|
|
102
|
-
"gitHead": "75337bd147d2d61a203a8f222551d3054fcedade"
|
|
52
|
+
"gitHead": "f02238a478b7ffd3f31d8deea292eb67e630a86b"
|
|
103
53
|
}
|
|
@@ -8,16 +8,18 @@
|
|
|
8
8
|
"enabled": false,
|
|
9
9
|
"secret": 1234567890
|
|
10
10
|
},
|
|
11
|
-
"
|
|
11
|
+
"sockethub": {
|
|
12
12
|
"port": 10550,
|
|
13
13
|
"host": "localhost",
|
|
14
14
|
"path": "/sockethub"
|
|
15
15
|
},
|
|
16
16
|
"log_file": "",
|
|
17
|
-
"platforms":
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
17
|
+
"platforms": [
|
|
18
|
+
"@sockethub/platform-dummy",
|
|
19
|
+
"@sockethub/platform-feeds",
|
|
20
|
+
"@sockethub/platform-irc",
|
|
21
|
+
"@sockethub/platform-xmpp"
|
|
22
|
+
],
|
|
21
23
|
"public": {
|
|
22
24
|
"protocol": "http",
|
|
23
25
|
"host": "localhost",
|
|
@@ -27,6 +29,5 @@
|
|
|
27
29
|
"redis": {
|
|
28
30
|
"host": "127.0.0.1",
|
|
29
31
|
"port": 6379
|
|
30
|
-
}
|
|
31
|
-
"workers": 1
|
|
32
|
+
}
|
|
32
33
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,79 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
/* Basic Options */
|
|
4
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
5
|
-
"target": "es6",
|
|
6
|
-
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
|
|
7
|
-
"module": "commonjs",
|
|
8
|
-
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
|
9
|
-
"lib": ["esnext"], /* Specify library files to be included in the compilation. */
|
|
10
4
|
"allowJs": false,
|
|
11
|
-
/* Allow javascript files to be compiled. */
|
|
12
|
-
// "checkJs": true, /* Report errors in .js files. */
|
|
13
|
-
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
14
|
-
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
15
|
-
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
16
|
-
"sourceMap": true,
|
|
17
|
-
/* Generates corresponding '.map' file. */
|
|
18
|
-
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
19
5
|
"outDir": "dist",
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// "removeComments": true, /* Do not emit comments to output. */
|
|
25
|
-
// "noEmit": true, /* Do not emit outputs. */
|
|
26
|
-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
27
|
-
"downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
28
|
-
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
29
|
-
|
|
30
|
-
/* Strict Type-Checking Options */
|
|
31
|
-
// "strict": true, /* Enable all strict type-checking options. */
|
|
32
|
-
"noImplicitAny": false,
|
|
33
|
-
/* Raise error on expressions and declarations with an implied 'any' type. */
|
|
34
|
-
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
35
|
-
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
36
|
-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
37
|
-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
38
|
-
"noImplicitThis": false,
|
|
39
|
-
/* Raise error on 'this' expressions with an implied 'any' type. */
|
|
40
|
-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
41
|
-
|
|
42
|
-
/* Additional Checks */
|
|
43
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
44
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
45
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
46
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
47
|
-
|
|
48
|
-
/* Module Resolution Options */
|
|
49
|
-
"moduleResolution": "node",
|
|
50
|
-
/* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
51
|
-
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
52
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
53
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
54
|
-
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
55
|
-
"types": ["mocha", "node"], /* Type declaration files to be included in compilation. */
|
|
56
|
-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
57
|
-
"esModuleInterop": true,
|
|
58
|
-
/* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
59
|
-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
60
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
61
|
-
|
|
62
|
-
/* Source Map Options */
|
|
63
|
-
"sourceRoot": "/", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
64
|
-
"mapRoot": "/", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
65
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
66
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
67
|
-
|
|
68
|
-
/* Experimental Options */
|
|
69
|
-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
70
|
-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
71
|
-
"resolveJsonModule": true
|
|
6
|
+
"rootDir": "src",
|
|
7
|
+
"baseUrl": "/",
|
|
8
|
+
"sourceRoot": "/",
|
|
9
|
+
"mapRoot": "/",
|
|
72
10
|
},
|
|
73
11
|
"include": [
|
|
74
12
|
"src"
|
|
75
13
|
],
|
|
76
14
|
"exclude": [
|
|
77
|
-
"
|
|
15
|
+
"**/*.test.ts"
|
|
78
16
|
]
|
|
79
17
|
}
|
package/README.md
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
[](http://sockethub.org)
|
|
2
|
-
|
|
3
|
-
A protocol gateway for the web.
|
|
4
|
-
|
|
5
|
-
## About
|
|
6
|
-
Sockethub is a translation layer for web applications to communicate with other protocols and services that are traditionally either inaccessible or impractical to use from in-browser JavaScript.
|
|
7
|
-
|
|
8
|
-
Using [ActivityStream](http://activitystrea.ms/) (AS) objects to pass messages to and from the web app, Sockethub acts as a smart proxy server/agent, which can maintain state, and connect to sockets, endpoints and networks that would otherwise be restricted from an application running in the browser.
|
|
9
|
-
|
|
10
|
-
Originally inspired as a sister project to [RemoteStorage](https://remotestorage.io), and assisting in the development of [unhosted](http://unhosted.org) and [noBackend](http://nobackend.org) applications, Sockethub's functionality can also fit into a more traditional development stack, removing the need for custom code to handle various protocol specifics at the application layer.
|
|
11
|
-
|
|
12
|
-
Example uses of Sockethub are:
|
|
13
|
-
|
|
14
|
-
* Writing and receiving messages (SMTP, IMAP, Facebook, Twitter, ...)
|
|
15
|
-
* Instant messaging (XMPP, IRC, MSN, FB Messenger, Hangouts, ...)
|
|
16
|
-
* Discovery (WebFinger, RDF(a), ...)
|
|
17
|
-
|
|
18
|
-
The architecture of Sockethub is extensible and supports easy implementation of additional 'platforms' to carry out tasks.
|
|
19
|
-
|
|
20
|
-
## Docs
|
|
21
|
-
|
|
22
|
-
See the [Sockethub wiki](https://github.com/sockethub/sockethub/wiki) for documentation.
|
|
23
|
-
|
|
24
|
-
## Features
|
|
25
|
-
|
|
26
|
-
We use ActivityStreams to map the various actions of a platform to a set of AS '@type's which identify the underlying action. For example, using the XMPP platform, a friend request/accept cycle would use the activity stream types 'request-friend', 'remove-friend', 'make-friend'.
|
|
27
|
-
|
|
28
|
-
Below is a list of platform contexts we're currently working on and their types, both the completed and not yet implemented ones. They are all implemented in Sockethub platforms (each in their own repository) and can be enabled/disabled in the `config.json`.
|
|
29
|
-
|
|
30
|
-
## Platforms
|
|
31
|
-
|
|
32
|
-
* [Feeds](../sockethub-platform-feeds) *(RSS, Atom)*
|
|
33
|
-
* [IRC](../sockethub-platform-irc)
|
|
34
|
-
* [XMPP](../sockethub-platform-xmpp)
|
|
35
|
-
|
|
36
|
-
## Install
|
|
37
|
-
|
|
38
|
-
`$ npm install -g sockethub`
|
|
39
|
-
|
|
40
|
-
## Running
|
|
41
|
-
|
|
42
|
-
### Environment Variables
|
|
43
|
-
|
|
44
|
-
* PORT
|
|
45
|
-
Defaults to `10550`
|
|
46
|
-
* HOST
|
|
47
|
-
Defaults to `localhost`
|
|
48
|
-
* DEBUG
|
|
49
|
-
Specify the namespace to console log, ie. `sockethub*` will print all sockethub related debug statements, whereas `*` will also print any other modules debug statements that use the `debug` module.
|
|
50
|
-
|
|
51
|
-
* REDIS_PORT
|
|
52
|
-
Defaults to `6379`
|
|
53
|
-
* REDIS_HOST
|
|
54
|
-
Defaults to `localhost`
|
|
55
|
-
|
|
56
|
-
***OR***
|
|
57
|
-
|
|
58
|
-
* REDIS_URL
|
|
59
|
-
Overrides `REDIS_HOST` and `REDIS_PORT`, can specify a full redis connect URL (eq. `redis://username:password@host:port`)
|
|
60
|
-
|
|
61
|
-
### Command-line params
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
--help : this help screen
|
|
65
|
-
--info : displays some basic runtime info
|
|
66
|
-
|
|
67
|
-
--examples : enabled examples page and serves helper files like jquery
|
|
68
|
-
|
|
69
|
-
--host : hostname to bind to
|
|
70
|
-
--port : port to bind to
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Start
|
|
74
|
-
|
|
75
|
-
Run with debug output and examples enabled:
|
|
76
|
-
|
|
77
|
-
`$ DEBUG=sockethub* sockethub --examples`
|
|
78
|
-
|
|
79
|
-
You should then be able to browse to `http://localhost:10550/examples` and try out the examples.
|
|
80
|
-
|
|
81
|
-
For production, with examples disabled.
|
|
82
|
-
|
|
83
|
-
`$ DEBUG=sockethub* sockethub`
|
|
84
|
-
|
|
85
|
-
## License
|
|
86
|
-
|
|
87
|
-
Sockethub is licensed under the [LGPL](https://github.com/sockethub/sockethub/blob/master/LICENSE)
|
|
88
|
-
|
|
89
|
-
## Credits
|
|
90
|
-
|
|
91
|
-
Project created and maintained by [Nick Jennings](http://github.com/silverbucket)
|
|
92
|
-
|
|
93
|
-
Logo design by [Jan-Christoph Borchardt](http://jancborchardt.net)
|
|
94
|
-
|
|
95
|
-
Sponsored by [NLNET](http://nlnet.nl)
|
|
96
|
-
|
|
97
|
-
[](http://nlnet.nl)
|
|
98
|
-
|
package/config.json.example
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"activity-streams": {
|
|
3
|
-
"opts": {
|
|
4
|
-
"specialObjs": [ "credentials" ]
|
|
5
|
-
}
|
|
6
|
-
},
|
|
7
|
-
"examples": {
|
|
8
|
-
"enabled": false,
|
|
9
|
-
"secret": 1234567890
|
|
10
|
-
},
|
|
11
|
-
"service": {
|
|
12
|
-
"port": 10550,
|
|
13
|
-
"host": "localhost",
|
|
14
|
-
"path": "/sockethub"
|
|
15
|
-
},
|
|
16
|
-
"log_file": "",
|
|
17
|
-
"platforms": {
|
|
18
|
-
"whitelist": [],
|
|
19
|
-
"blacklist": []
|
|
20
|
-
},
|
|
21
|
-
"public": {
|
|
22
|
-
"protocol": "http",
|
|
23
|
-
"host": "localhost",
|
|
24
|
-
"port": 10550,
|
|
25
|
-
"path": "/"
|
|
26
|
-
},
|
|
27
|
-
"redis": {
|
|
28
|
-
"host": "redis",
|
|
29
|
-
"port": 6379
|
|
30
|
-
},
|
|
31
|
-
"workers": 1
|
|
32
|
-
}
|