@device-portal/server 0.0.1 → 0.0.5
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/dist/main.js +5 -3
- package/package.json +17 -2
package/dist/main.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const node_server_1 = require("@hono/node-server");
|
|
@@ -93,9 +94,10 @@ app.get('/v0/', upgradeWebSocket((context) => {
|
|
|
93
94
|
},
|
|
94
95
|
};
|
|
95
96
|
}));
|
|
96
|
-
const
|
|
97
|
+
const storybookRelativePath = '../react/storybook-static';
|
|
98
|
+
const storybookPath = (0, path_1.resolve)(__dirname, '..', storybookRelativePath);
|
|
97
99
|
if ((0, fs_1.existsSync)(storybookPath)) {
|
|
98
|
-
app.use('/*', (0, serve_static_1.serveStatic)({ root: '../
|
|
100
|
+
app.use('/*', (0, serve_static_1.serveStatic)({ root: '../react/storybook-static' }));
|
|
99
101
|
}
|
|
100
102
|
const portString = process.env.PORT;
|
|
101
103
|
let port = 8080;
|
|
@@ -105,7 +107,7 @@ if (portString) {
|
|
|
105
107
|
port = parsedPort;
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
console.log(`Starting signaling server on 0.0.0.0:${port}
|
|
110
|
+
console.log(`Starting signaling server on http://0.0.0.0:${port}`);
|
|
109
111
|
const server = (0, node_server_1.serve)({
|
|
110
112
|
fetch: app.fetch,
|
|
111
113
|
port,
|
package/package.json
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@device-portal/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"device-portal-server": "dist/main.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "tsc",
|
|
9
|
+
"build": "tsc && node ./scripts/add-shebang.js ./dist/main.js",
|
|
10
10
|
"start": "node dist/main.js",
|
|
11
11
|
"dev": "node --watch -r ts-node/register src/main.ts",
|
|
12
12
|
"test": "tsc --build --dry",
|
|
13
13
|
"prepare": "npm run build"
|
|
14
14
|
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/FilipChalupa/device-portal.git"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"webrtc",
|
|
21
|
+
"server",
|
|
22
|
+
"signaling",
|
|
23
|
+
"websocket"
|
|
24
|
+
],
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Filip Chalupa",
|
|
27
|
+
"email": "chalupa.filip@gmail.com",
|
|
28
|
+
"url": "https://www.npmjs.com/~onset"
|
|
29
|
+
},
|
|
15
30
|
"files": [
|
|
16
31
|
"/dist/"
|
|
17
32
|
],
|