superdoor 26.9.24
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/app.ini +11 -0
- package/main.js +27 -0
- package/package.json +16 -0
- package/superdoor-darwin-arm64 +0 -0
- package/superdoor-linux-amd64 +0 -0
- package/superdoor-windows-amd64.exe +0 -0
package/app.ini
ADDED
package/main.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const process = require('process');
|
|
6
|
+
const child_process = require('child_process');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
console.log("启动参数:\n");
|
|
10
|
+
console.log(process.argv);
|
|
11
|
+
|
|
12
|
+
//引导启动开发服务器
|
|
13
|
+
var superdoorBinPath = ''
|
|
14
|
+
switch (process.platform) {
|
|
15
|
+
case "darwin": superdoorBinPath = path.resolve(__dirname, 'superdoor-darwin-arm64'); break;
|
|
16
|
+
case "win32": superdoorBinPath = path.resolve(__dirname, 'superdoor-windows-amd64.exe'); break;
|
|
17
|
+
case "linux": superdoorBinPath = path.resolve(__dirname, 'superdoor-linux-amd64'); break;
|
|
18
|
+
default:
|
|
19
|
+
console.log("superdoor暂不支持当前平台" + platform);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//启动superdoor子进程
|
|
25
|
+
//标准io嵌入父进程
|
|
26
|
+
child_process.execFileSync(superdoorBinPath, process.argv, { stdio: 'inherit' });
|
|
27
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "superdoor",
|
|
3
|
+
"version": "26.9.24",
|
|
4
|
+
"description": "GOLANG实现的Web服务器,无libc依赖",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "node main.js --config app.ini"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"Superdoor"
|
|
10
|
+
],
|
|
11
|
+
"author": "Fan.Y <yuanfan@sanchaniu.com>",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"bin": {
|
|
14
|
+
"superdoor": "main.js"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|