@robinpath/server 0.1.0 → 0.1.1
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/README.md +98 -98
- package/package.json +37 -7
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/server.d.ts +0 -214
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js +0 -551
- package/dist/server.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
# @robinpath/server
|
|
2
|
-
|
|
3
|
-
> HTTP server creation and management using Node.js built-in http module. Supports routing, static file serving, CORS, and common response helpers.
|
|
4
|
-
|
|
5
|
-
   
|
|
6
|
-
|
|
7
|
-
## Why use this module?
|
|
8
|
-
|
|
9
|
-
The `server` module lets you:
|
|
10
|
-
|
|
11
|
-
- Create a new HTTP server instance
|
|
12
|
-
- Start listening for incoming connections
|
|
13
|
-
- Stop the server and close all connections
|
|
14
|
-
- Register a handler for all incoming requests
|
|
15
|
-
- Register an error handler for the server
|
|
16
|
-
|
|
17
|
-
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install @robinpath/server
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Quick Start
|
|
26
|
-
|
|
27
|
-
No credentials needed — start using it right away:
|
|
28
|
-
|
|
29
|
-
```robinpath
|
|
30
|
-
server.start
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Available Functions
|
|
34
|
-
|
|
35
|
-
| Function | Description |
|
|
36
|
-
|----------|-------------|
|
|
37
|
-
| `server.create` | Create a new HTTP server instance |
|
|
38
|
-
| `server.start` | Start listening for incoming connections |
|
|
39
|
-
| `server.stop` | Stop the server and close all connections |
|
|
40
|
-
| `server.onRequest` | Register a handler for all incoming requests |
|
|
41
|
-
| `server.onError` | Register an error handler for the server |
|
|
42
|
-
| `server.route` | Add a route with method, path pattern, and handler |
|
|
43
|
-
| `server.static` | Serve static files from a directory |
|
|
44
|
-
| `server.sendJson` | Send a JSON response |
|
|
45
|
-
| `server.sendHtml` | Send an HTML response |
|
|
46
|
-
| `server.sendFile` | Send a file as the response |
|
|
47
|
-
| `server.sendRedirect` | Send an HTTP redirect response |
|
|
48
|
-
| `server.status` | Send a response with a specific status code |
|
|
49
|
-
| `server.cors` | Enable and configure CORS headers for a server |
|
|
50
|
-
| `server.getServers` | List all active server instances |
|
|
51
|
-
| `server.getRoutes` | List all routes registered on a server |
|
|
52
|
-
|
|
53
|
-
## Examples
|
|
54
|
-
|
|
55
|
-
### Start listening for incoming connections
|
|
56
|
-
|
|
57
|
-
```robinpath
|
|
58
|
-
server.start
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Stop the server and close all connections
|
|
62
|
-
|
|
63
|
-
```robinpath
|
|
64
|
-
server.stop
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Register a handler for all incoming requests
|
|
68
|
-
|
|
69
|
-
```robinpath
|
|
70
|
-
server.onRequest
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Integration with RobinPath
|
|
74
|
-
|
|
75
|
-
```typescript
|
|
76
|
-
import { RobinPath } from "@wiredwp/robinpath";
|
|
77
|
-
import Module from "@robinpath/server";
|
|
78
|
-
|
|
79
|
-
const rp = new RobinPath();
|
|
80
|
-
rp.registerModule(Module.name, Module.functions);
|
|
81
|
-
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
82
|
-
|
|
83
|
-
const result = await rp.executeScript(`
|
|
84
|
-
server.start
|
|
85
|
-
`);
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Full API Reference
|
|
89
|
-
|
|
90
|
-
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
91
|
-
|
|
92
|
-
## Related Modules
|
|
93
|
-
|
|
94
|
-
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
95
|
-
|
|
96
|
-
## License
|
|
97
|
-
|
|
98
|
-
MIT
|
|
1
|
+
# @robinpath/server
|
|
2
|
+
|
|
3
|
+
> HTTP server creation and management using Node.js built-in http module. Supports routing, static file serving, CORS, and common response helpers.
|
|
4
|
+
|
|
5
|
+
   
|
|
6
|
+
|
|
7
|
+
## Why use this module?
|
|
8
|
+
|
|
9
|
+
The `server` module lets you:
|
|
10
|
+
|
|
11
|
+
- Create a new HTTP server instance
|
|
12
|
+
- Start listening for incoming connections
|
|
13
|
+
- Stop the server and close all connections
|
|
14
|
+
- Register a handler for all incoming requests
|
|
15
|
+
- Register an error handler for the server
|
|
16
|
+
|
|
17
|
+
All functions are callable directly from RobinPath scripts with a simple, consistent API.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @robinpath/server
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
No credentials needed — start using it right away:
|
|
28
|
+
|
|
29
|
+
```robinpath
|
|
30
|
+
server.start
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Available Functions
|
|
34
|
+
|
|
35
|
+
| Function | Description |
|
|
36
|
+
|----------|-------------|
|
|
37
|
+
| `server.create` | Create a new HTTP server instance |
|
|
38
|
+
| `server.start` | Start listening for incoming connections |
|
|
39
|
+
| `server.stop` | Stop the server and close all connections |
|
|
40
|
+
| `server.onRequest` | Register a handler for all incoming requests |
|
|
41
|
+
| `server.onError` | Register an error handler for the server |
|
|
42
|
+
| `server.route` | Add a route with method, path pattern, and handler |
|
|
43
|
+
| `server.static` | Serve static files from a directory |
|
|
44
|
+
| `server.sendJson` | Send a JSON response |
|
|
45
|
+
| `server.sendHtml` | Send an HTML response |
|
|
46
|
+
| `server.sendFile` | Send a file as the response |
|
|
47
|
+
| `server.sendRedirect` | Send an HTTP redirect response |
|
|
48
|
+
| `server.status` | Send a response with a specific status code |
|
|
49
|
+
| `server.cors` | Enable and configure CORS headers for a server |
|
|
50
|
+
| `server.getServers` | List all active server instances |
|
|
51
|
+
| `server.getRoutes` | List all routes registered on a server |
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
### Start listening for incoming connections
|
|
56
|
+
|
|
57
|
+
```robinpath
|
|
58
|
+
server.start
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Stop the server and close all connections
|
|
62
|
+
|
|
63
|
+
```robinpath
|
|
64
|
+
server.stop
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Register a handler for all incoming requests
|
|
68
|
+
|
|
69
|
+
```robinpath
|
|
70
|
+
server.onRequest
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Integration with RobinPath
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
import { RobinPath } from "@wiredwp/robinpath";
|
|
77
|
+
import Module from "@robinpath/server";
|
|
78
|
+
|
|
79
|
+
const rp = new RobinPath();
|
|
80
|
+
rp.registerModule(Module.name, Module.functions);
|
|
81
|
+
rp.registerModuleMeta(Module.name, Module.functionMetadata);
|
|
82
|
+
|
|
83
|
+
const result = await rp.executeScript(`
|
|
84
|
+
server.start
|
|
85
|
+
`);
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Full API Reference
|
|
89
|
+
|
|
90
|
+
See [MODULE.md](./MODULE.md) for complete documentation including all parameters, return types, error handling, and advanced examples.
|
|
91
|
+
|
|
92
|
+
## Related Modules
|
|
93
|
+
|
|
94
|
+
- [`@robinpath/json`](../json) — JSON module for complementary functionality
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robinpath/server",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"publishConfig": {
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
5
7
|
"type": "module",
|
|
6
8
|
"main": "dist/index.js",
|
|
7
9
|
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"test": "node --import tsx --test tests/*.test.ts"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@robinpath/core": ">=0.20.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@robinpath/core": "^0.30.1",
|
|
28
|
+
"tsx": "^4.19.0",
|
|
29
|
+
"typescript": "^5.6.0"
|
|
30
|
+
},
|
|
31
|
+
"description": "HTTP server creation and management using Node.js built-in http module. Supports routing, static file serving, CORS, and common response helpers.",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"server",
|
|
34
|
+
"web"
|
|
35
|
+
],
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"robinpath": {
|
|
38
|
+
"category": "web",
|
|
39
|
+
"type": "utility",
|
|
40
|
+
"auth": "none",
|
|
41
|
+
"functionCount": 15
|
|
42
|
+
}
|
|
13
43
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ModuleAdapter } from "@wiredwp/robinpath";
|
|
2
|
-
declare const ServerModule: ModuleAdapter;
|
|
3
|
-
export default ServerModule;
|
|
4
|
-
export { ServerModule };
|
|
5
|
-
export { ServerFunctions, ServerFunctionMetadata, ServerModuleMetadata } from "./server.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,QAAA,MAAM,YAAY,EAAE,aAA2K,CAAC;AAEhM,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ServerFunctions, ServerFunctionMetadata, ServerModuleMetadata } from "./server.js";
|
|
2
|
-
const ServerModule = { name: "server", functions: ServerFunctions, functionMetadata: ServerFunctionMetadata, moduleMetadata: ServerModuleMetadata, global: false };
|
|
3
|
-
export default ServerModule;
|
|
4
|
-
export { ServerModule };
|
|
5
|
-
export { ServerFunctions, ServerFunctionMetadata, ServerModuleMetadata } from "./server.js";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE5F,MAAM,YAAY,GAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAA6B,EAAE,cAAc,EAAE,oBAA2B,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAEhM,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/server.d.ts
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import type { BuiltinHandler } from "@wiredwp/robinpath";
|
|
2
|
-
export declare const ServerFunctions: {
|
|
3
|
-
create: BuiltinHandler;
|
|
4
|
-
start: BuiltinHandler;
|
|
5
|
-
stop: BuiltinHandler;
|
|
6
|
-
onRequest: BuiltinHandler;
|
|
7
|
-
onError: BuiltinHandler;
|
|
8
|
-
route: BuiltinHandler;
|
|
9
|
-
static: BuiltinHandler;
|
|
10
|
-
sendJson: BuiltinHandler;
|
|
11
|
-
sendHtml: BuiltinHandler;
|
|
12
|
-
sendFile: BuiltinHandler;
|
|
13
|
-
sendRedirect: BuiltinHandler;
|
|
14
|
-
status: BuiltinHandler;
|
|
15
|
-
cors: BuiltinHandler;
|
|
16
|
-
getServers: BuiltinHandler;
|
|
17
|
-
getRoutes: BuiltinHandler;
|
|
18
|
-
};
|
|
19
|
-
export declare const ServerFunctionMetadata: {
|
|
20
|
-
create: {
|
|
21
|
-
description: string;
|
|
22
|
-
parameters: {
|
|
23
|
-
name: string;
|
|
24
|
-
dataType: string;
|
|
25
|
-
description: string;
|
|
26
|
-
optional: boolean;
|
|
27
|
-
}[];
|
|
28
|
-
returnType: string;
|
|
29
|
-
returnDescription: string;
|
|
30
|
-
};
|
|
31
|
-
start: {
|
|
32
|
-
description: string;
|
|
33
|
-
parameters: {
|
|
34
|
-
name: string;
|
|
35
|
-
dataType: string;
|
|
36
|
-
description: string;
|
|
37
|
-
}[];
|
|
38
|
-
returnType: string;
|
|
39
|
-
returnDescription: string;
|
|
40
|
-
};
|
|
41
|
-
stop: {
|
|
42
|
-
description: string;
|
|
43
|
-
parameters: {
|
|
44
|
-
name: string;
|
|
45
|
-
dataType: string;
|
|
46
|
-
description: string;
|
|
47
|
-
}[];
|
|
48
|
-
returnType: string;
|
|
49
|
-
returnDescription: string;
|
|
50
|
-
};
|
|
51
|
-
onRequest: {
|
|
52
|
-
description: string;
|
|
53
|
-
parameters: {
|
|
54
|
-
name: string;
|
|
55
|
-
dataType: string;
|
|
56
|
-
description: string;
|
|
57
|
-
}[];
|
|
58
|
-
returnType: string;
|
|
59
|
-
returnDescription: string;
|
|
60
|
-
};
|
|
61
|
-
onError: {
|
|
62
|
-
description: string;
|
|
63
|
-
parameters: {
|
|
64
|
-
name: string;
|
|
65
|
-
dataType: string;
|
|
66
|
-
description: string;
|
|
67
|
-
}[];
|
|
68
|
-
returnType: string;
|
|
69
|
-
returnDescription: string;
|
|
70
|
-
};
|
|
71
|
-
route: {
|
|
72
|
-
description: string;
|
|
73
|
-
parameters: ({
|
|
74
|
-
name: string;
|
|
75
|
-
dataType: string;
|
|
76
|
-
description: string;
|
|
77
|
-
optional?: undefined;
|
|
78
|
-
} | {
|
|
79
|
-
name: string;
|
|
80
|
-
dataType: string;
|
|
81
|
-
description: string;
|
|
82
|
-
optional: boolean;
|
|
83
|
-
})[];
|
|
84
|
-
returnType: string;
|
|
85
|
-
returnDescription: string;
|
|
86
|
-
};
|
|
87
|
-
static: {
|
|
88
|
-
description: string;
|
|
89
|
-
parameters: {
|
|
90
|
-
name: string;
|
|
91
|
-
dataType: string;
|
|
92
|
-
description: string;
|
|
93
|
-
}[];
|
|
94
|
-
returnType: string;
|
|
95
|
-
returnDescription: string;
|
|
96
|
-
};
|
|
97
|
-
sendJson: {
|
|
98
|
-
description: string;
|
|
99
|
-
parameters: ({
|
|
100
|
-
name: string;
|
|
101
|
-
dataType: string;
|
|
102
|
-
description: string;
|
|
103
|
-
optional?: undefined;
|
|
104
|
-
} | {
|
|
105
|
-
name: string;
|
|
106
|
-
dataType: string;
|
|
107
|
-
description: string;
|
|
108
|
-
optional: boolean;
|
|
109
|
-
})[];
|
|
110
|
-
returnType: string;
|
|
111
|
-
returnDescription: string;
|
|
112
|
-
};
|
|
113
|
-
sendHtml: {
|
|
114
|
-
description: string;
|
|
115
|
-
parameters: ({
|
|
116
|
-
name: string;
|
|
117
|
-
dataType: string;
|
|
118
|
-
description: string;
|
|
119
|
-
optional?: undefined;
|
|
120
|
-
} | {
|
|
121
|
-
name: string;
|
|
122
|
-
dataType: string;
|
|
123
|
-
description: string;
|
|
124
|
-
optional: boolean;
|
|
125
|
-
})[];
|
|
126
|
-
returnType: string;
|
|
127
|
-
returnDescription: string;
|
|
128
|
-
};
|
|
129
|
-
sendFile: {
|
|
130
|
-
description: string;
|
|
131
|
-
parameters: ({
|
|
132
|
-
name: string;
|
|
133
|
-
dataType: string;
|
|
134
|
-
description: string;
|
|
135
|
-
optional?: undefined;
|
|
136
|
-
} | {
|
|
137
|
-
name: string;
|
|
138
|
-
dataType: string;
|
|
139
|
-
description: string;
|
|
140
|
-
optional: boolean;
|
|
141
|
-
})[];
|
|
142
|
-
returnType: string;
|
|
143
|
-
returnDescription: string;
|
|
144
|
-
};
|
|
145
|
-
sendRedirect: {
|
|
146
|
-
description: string;
|
|
147
|
-
parameters: ({
|
|
148
|
-
name: string;
|
|
149
|
-
dataType: string;
|
|
150
|
-
description: string;
|
|
151
|
-
optional?: undefined;
|
|
152
|
-
} | {
|
|
153
|
-
name: string;
|
|
154
|
-
dataType: string;
|
|
155
|
-
description: string;
|
|
156
|
-
optional: boolean;
|
|
157
|
-
})[];
|
|
158
|
-
returnType: string;
|
|
159
|
-
returnDescription: string;
|
|
160
|
-
};
|
|
161
|
-
status: {
|
|
162
|
-
description: string;
|
|
163
|
-
parameters: ({
|
|
164
|
-
name: string;
|
|
165
|
-
dataType: string;
|
|
166
|
-
description: string;
|
|
167
|
-
optional?: undefined;
|
|
168
|
-
} | {
|
|
169
|
-
name: string;
|
|
170
|
-
dataType: string;
|
|
171
|
-
description: string;
|
|
172
|
-
optional: boolean;
|
|
173
|
-
})[];
|
|
174
|
-
returnType: string;
|
|
175
|
-
returnDescription: string;
|
|
176
|
-
};
|
|
177
|
-
cors: {
|
|
178
|
-
description: string;
|
|
179
|
-
parameters: ({
|
|
180
|
-
name: string;
|
|
181
|
-
dataType: string;
|
|
182
|
-
description: string;
|
|
183
|
-
optional?: undefined;
|
|
184
|
-
} | {
|
|
185
|
-
name: string;
|
|
186
|
-
dataType: string;
|
|
187
|
-
description: string;
|
|
188
|
-
optional: boolean;
|
|
189
|
-
})[];
|
|
190
|
-
returnType: string;
|
|
191
|
-
returnDescription: string;
|
|
192
|
-
};
|
|
193
|
-
getServers: {
|
|
194
|
-
description: string;
|
|
195
|
-
parameters: never[];
|
|
196
|
-
returnType: string;
|
|
197
|
-
returnDescription: string;
|
|
198
|
-
};
|
|
199
|
-
getRoutes: {
|
|
200
|
-
description: string;
|
|
201
|
-
parameters: {
|
|
202
|
-
name: string;
|
|
203
|
-
dataType: string;
|
|
204
|
-
description: string;
|
|
205
|
-
}[];
|
|
206
|
-
returnType: string;
|
|
207
|
-
returnDescription: string;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
export declare const ServerModuleMetadata: {
|
|
211
|
-
description: string;
|
|
212
|
-
version: string;
|
|
213
|
-
};
|
|
214
|
-
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAA2C,MAAM,oBAAoB,CAAC;AA2alG,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;CAgB3B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2JlC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC"}
|
package/dist/server.js
DELETED
|
@@ -1,551 +0,0 @@
|
|
|
1
|
-
const servers = new Map();
|
|
2
|
-
// ---------------------------------------------------------------------------
|
|
3
|
-
// Helpers
|
|
4
|
-
// ---------------------------------------------------------------------------
|
|
5
|
-
function getServer(id) {
|
|
6
|
-
const inst = servers.get(id);
|
|
7
|
-
if (!inst)
|
|
8
|
-
throw new Error(`Server "${id}" not found`);
|
|
9
|
-
return inst;
|
|
10
|
-
}
|
|
11
|
-
function mimeType(ext) {
|
|
12
|
-
const types = {
|
|
13
|
-
".html": "text/html", ".htm": "text/html", ".css": "text/css",
|
|
14
|
-
".js": "application/javascript", ".json": "application/json",
|
|
15
|
-
".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg",
|
|
16
|
-
".gif": "image/gif", ".svg": "image/svg+xml", ".ico": "image/x-icon",
|
|
17
|
-
".txt": "text/plain", ".xml": "application/xml", ".pdf": "application/pdf",
|
|
18
|
-
".woff": "font/woff", ".woff2": "font/woff2", ".ttf": "font/ttf",
|
|
19
|
-
".eot": "application/vnd.ms-fontobject", ".mp3": "audio/mpeg",
|
|
20
|
-
".mp4": "video/mp4", ".webm": "video/webm", ".webp": "image/webp",
|
|
21
|
-
".wasm": "application/wasm", ".map": "application/json",
|
|
22
|
-
};
|
|
23
|
-
return types[ext] || "application/octet-stream";
|
|
24
|
-
}
|
|
25
|
-
function matchRoute(routes, method, url) {
|
|
26
|
-
const pathname = url.split("?")[0];
|
|
27
|
-
for (const route of routes) {
|
|
28
|
-
if (route.method !== "*" && route.method !== method.toUpperCase())
|
|
29
|
-
continue;
|
|
30
|
-
if (routeMatches(route.path, pathname))
|
|
31
|
-
return route;
|
|
32
|
-
}
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
function routeMatches(pattern, pathname) {
|
|
36
|
-
const patternParts = pattern.split("/").filter(Boolean);
|
|
37
|
-
const pathParts = pathname.split("/").filter(Boolean);
|
|
38
|
-
if (patternParts.length !== pathParts.length) {
|
|
39
|
-
if (patternParts[patternParts.length - 1] !== "*")
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
for (let i = 0; i < patternParts.length; i++) {
|
|
43
|
-
if (patternParts[i] === "*")
|
|
44
|
-
return true;
|
|
45
|
-
if (patternParts[i].startsWith(":"))
|
|
46
|
-
continue;
|
|
47
|
-
if (patternParts[i] !== pathParts[i])
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
return patternParts.length === pathParts.length;
|
|
51
|
-
}
|
|
52
|
-
function extractParams(pattern, pathname) {
|
|
53
|
-
const patternParts = pattern.split("/").filter(Boolean);
|
|
54
|
-
const pathParts = pathname.split("/").filter(Boolean);
|
|
55
|
-
const params = {};
|
|
56
|
-
for (let i = 0; i < patternParts.length; i++) {
|
|
57
|
-
if (patternParts[i].startsWith(":")) {
|
|
58
|
-
params[patternParts[i].slice(1)] = pathParts[i] || "";
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return params;
|
|
62
|
-
}
|
|
63
|
-
function tryServeStatic(inst, req, res) {
|
|
64
|
-
const pathname = (req.url || "/").split("?")[0];
|
|
65
|
-
for (const dir of inst.staticDirs) {
|
|
66
|
-
const filePath = any(dir, pathname);
|
|
67
|
-
// Prevent path traversal
|
|
68
|
-
if (!filePath.startsWith(dir))
|
|
69
|
-
continue;
|
|
70
|
-
try {
|
|
71
|
-
const stat = any(filePath);
|
|
72
|
-
if (stat.isFile()) {
|
|
73
|
-
const ext = any(filePath);
|
|
74
|
-
res.setHeader("Content-Type", mimeType(ext));
|
|
75
|
-
res.setHeader("Content-Length", stat.size);
|
|
76
|
-
const stream = any(filePath);
|
|
77
|
-
stream.pipe(res);
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
// Try index.html for directories
|
|
81
|
-
if (stat.isDirectory()) {
|
|
82
|
-
const indexPath = any(filePath, "index.html");
|
|
83
|
-
try {
|
|
84
|
-
const indexStat = any(indexPath);
|
|
85
|
-
if (indexStat.isFile()) {
|
|
86
|
-
res.setHeader("Content-Type", "text/html");
|
|
87
|
-
res.setHeader("Content-Length", indexStat.size);
|
|
88
|
-
const stream = any(indexPath);
|
|
89
|
-
stream.pipe(res);
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
catch { /* no index.html */ }
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
catch { /* file not found, try next dir */ }
|
|
97
|
-
}
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
function applyCors(inst, res) {
|
|
101
|
-
if (!inst.corsOptions)
|
|
102
|
-
return;
|
|
103
|
-
res.setHeader("Access-Control-Allow-Origin", inst.corsOptions.origin);
|
|
104
|
-
res.setHeader("Access-Control-Allow-Methods", inst.corsOptions.methods);
|
|
105
|
-
res.setHeader("Access-Control-Allow-Headers", inst.corsOptions.headers);
|
|
106
|
-
}
|
|
107
|
-
function handleRequest(inst, req, res) {
|
|
108
|
-
applyCors(inst, res);
|
|
109
|
-
// Handle CORS preflight
|
|
110
|
-
if (req.method === "OPTIONS" && inst.corsOptions) {
|
|
111
|
-
res.writeHead(204);
|
|
112
|
-
res.end();
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
// Try custom request handlers first
|
|
116
|
-
for (const handler of inst.requestHandlers) {
|
|
117
|
-
handler(req, res);
|
|
118
|
-
if (res.writableEnded)
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
// Try route matching
|
|
122
|
-
const method = (req.method || "GET").toUpperCase();
|
|
123
|
-
const url = req.url || "/";
|
|
124
|
-
const route = matchRoute(inst.routes, method, url);
|
|
125
|
-
if (route) {
|
|
126
|
-
const pathname = url.split("?")[0];
|
|
127
|
-
const params = extractParams(route.path, pathname);
|
|
128
|
-
req.params = params;
|
|
129
|
-
route.handler(req, res);
|
|
130
|
-
if (res.writableEnded)
|
|
131
|
-
return;
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
// Try static files
|
|
135
|
-
if (tryServeStatic(inst, req, res))
|
|
136
|
-
return;
|
|
137
|
-
// 404
|
|
138
|
-
res.writeHead(404, { "Content-Type": "text/plain" });
|
|
139
|
-
res.end("Not Found");
|
|
140
|
-
}
|
|
141
|
-
// ---------------------------------------------------------------------------
|
|
142
|
-
// Functions
|
|
143
|
-
// ---------------------------------------------------------------------------
|
|
144
|
-
const create = (args) => {
|
|
145
|
-
const opts = (args[0] ?? {});
|
|
146
|
-
const id = (opts.id ?? opts.name ?? `server_${servers.size + 1}`);
|
|
147
|
-
const port = (opts.port ?? 3000);
|
|
148
|
-
const host = (opts.host ?? "0.0.0.0");
|
|
149
|
-
if (servers.has(id))
|
|
150
|
-
throw new Error(`Server "${id}" already exists`);
|
|
151
|
-
const inst = {
|
|
152
|
-
server: null,
|
|
153
|
-
port,
|
|
154
|
-
host,
|
|
155
|
-
routes: [],
|
|
156
|
-
requestHandlers: [],
|
|
157
|
-
errorHandlers: [],
|
|
158
|
-
staticDirs: [],
|
|
159
|
-
corsOptions: null,
|
|
160
|
-
};
|
|
161
|
-
const httpServer = any((req, res) => {
|
|
162
|
-
try {
|
|
163
|
-
handleRequest(inst, req, res);
|
|
164
|
-
}
|
|
165
|
-
catch (err) {
|
|
166
|
-
for (const handler of inst.errorHandlers) {
|
|
167
|
-
handler(err);
|
|
168
|
-
}
|
|
169
|
-
if (!res.writableEnded) {
|
|
170
|
-
res.writeHead(500, { "Content-Type": "text/plain" });
|
|
171
|
-
res.end("Internal Server Error");
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
httpServer.on("error", (err) => {
|
|
176
|
-
for (const handler of inst.errorHandlers) {
|
|
177
|
-
handler(err);
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
inst.server = httpServer;
|
|
181
|
-
servers.set(id, inst);
|
|
182
|
-
return { id, port, host };
|
|
183
|
-
};
|
|
184
|
-
const start = (args) => {
|
|
185
|
-
const opts = (args[0] ?? {});
|
|
186
|
-
const id = (opts.id ?? opts.name);
|
|
187
|
-
if (!id)
|
|
188
|
-
throw new Error("Server id is required");
|
|
189
|
-
const inst = getServer(id);
|
|
190
|
-
return new Promise((resolve, reject) => {
|
|
191
|
-
inst.server.listen(inst.port, inst.host, () => {
|
|
192
|
-
resolve({ id, port: inst.port, host: inst.host, listening: true });
|
|
193
|
-
});
|
|
194
|
-
inst.server.once("error", reject);
|
|
195
|
-
});
|
|
196
|
-
};
|
|
197
|
-
const stop = (args) => {
|
|
198
|
-
const opts = (args[0] ?? {});
|
|
199
|
-
const id = (opts.id ?? opts.name);
|
|
200
|
-
if (!id)
|
|
201
|
-
throw new Error("Server id is required");
|
|
202
|
-
const inst = getServer(id);
|
|
203
|
-
return new Promise((resolve, reject) => {
|
|
204
|
-
inst.server.close((err) => {
|
|
205
|
-
if (err)
|
|
206
|
-
reject(err);
|
|
207
|
-
else {
|
|
208
|
-
servers.delete(id);
|
|
209
|
-
resolve({ id, stopped: true });
|
|
210
|
-
}
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
};
|
|
214
|
-
const onRequest = (args) => {
|
|
215
|
-
const opts = (args[0] ?? {});
|
|
216
|
-
const id = (opts.id ?? opts.name);
|
|
217
|
-
const handler = opts.handler;
|
|
218
|
-
if (!id)
|
|
219
|
-
throw new Error("Server id is required");
|
|
220
|
-
if (typeof handler !== "function")
|
|
221
|
-
throw new Error("handler must be a function");
|
|
222
|
-
const inst = getServer(id);
|
|
223
|
-
inst.requestHandlers.push(handler);
|
|
224
|
-
return { id, handlerCount: inst.requestHandlers.length };
|
|
225
|
-
};
|
|
226
|
-
const onError = (args) => {
|
|
227
|
-
const opts = (args[0] ?? {});
|
|
228
|
-
const id = (opts.id ?? opts.name);
|
|
229
|
-
const handler = opts.handler;
|
|
230
|
-
if (!id)
|
|
231
|
-
throw new Error("Server id is required");
|
|
232
|
-
if (typeof handler !== "function")
|
|
233
|
-
throw new Error("handler must be a function");
|
|
234
|
-
const inst = getServer(id);
|
|
235
|
-
inst.errorHandlers.push(handler);
|
|
236
|
-
return { id, errorHandlerCount: inst.errorHandlers.length };
|
|
237
|
-
};
|
|
238
|
-
const route = (args) => {
|
|
239
|
-
const opts = (args[0] ?? {});
|
|
240
|
-
const id = (opts.id ?? opts.name);
|
|
241
|
-
const method = (opts.method ?? "GET").toUpperCase();
|
|
242
|
-
const routePath = opts.path;
|
|
243
|
-
const handler = opts.handler;
|
|
244
|
-
if (!id)
|
|
245
|
-
throw new Error("Server id is required");
|
|
246
|
-
if (!routePath)
|
|
247
|
-
throw new Error("path is required");
|
|
248
|
-
if (typeof handler !== "function")
|
|
249
|
-
throw new Error("handler must be a function");
|
|
250
|
-
const inst = getServer(id);
|
|
251
|
-
inst.routes.push({ method, path: routePath, handler });
|
|
252
|
-
return { id, method, path: routePath, routeCount: inst.routes.length };
|
|
253
|
-
};
|
|
254
|
-
const staticServe = (args) => {
|
|
255
|
-
const opts = (args[0] ?? {});
|
|
256
|
-
const id = (opts.id ?? opts.name);
|
|
257
|
-
const dir = opts.dir;
|
|
258
|
-
if (!id)
|
|
259
|
-
throw new Error("Server id is required");
|
|
260
|
-
if (!dir)
|
|
261
|
-
throw new Error("dir is required");
|
|
262
|
-
const resolvedDir = any(dir);
|
|
263
|
-
const inst = getServer(id);
|
|
264
|
-
inst.staticDirs.push(resolvedDir);
|
|
265
|
-
return { id, dir: resolvedDir, staticDirCount: inst.staticDirs.length };
|
|
266
|
-
};
|
|
267
|
-
const sendJson = (args) => {
|
|
268
|
-
const opts = (args[0] ?? {});
|
|
269
|
-
const res = opts.res;
|
|
270
|
-
const data = opts.data;
|
|
271
|
-
const statusCode = (opts.status ?? 200);
|
|
272
|
-
if (!res)
|
|
273
|
-
throw new Error("res is required");
|
|
274
|
-
const body = JSON.stringify(data);
|
|
275
|
-
res.writeHead(statusCode, {
|
|
276
|
-
"Content-Type": "application/json",
|
|
277
|
-
"Content-Length": Buffer.byteLength(body),
|
|
278
|
-
});
|
|
279
|
-
res.end(body);
|
|
280
|
-
return { sent: true, status: statusCode, contentType: "application/json" };
|
|
281
|
-
};
|
|
282
|
-
const sendHtml = (args) => {
|
|
283
|
-
const opts = (args[0] ?? {});
|
|
284
|
-
const res = opts.res;
|
|
285
|
-
const html = opts.html;
|
|
286
|
-
const statusCode = (opts.status ?? 200);
|
|
287
|
-
if (!res)
|
|
288
|
-
throw new Error("res is required");
|
|
289
|
-
if (typeof html !== "string")
|
|
290
|
-
throw new Error("html must be a string");
|
|
291
|
-
res.writeHead(statusCode, {
|
|
292
|
-
"Content-Type": "text/html",
|
|
293
|
-
"Content-Length": Buffer.byteLength(html),
|
|
294
|
-
});
|
|
295
|
-
res.end(html);
|
|
296
|
-
return { sent: true, status: statusCode, contentType: "text/html" };
|
|
297
|
-
};
|
|
298
|
-
const sendFile = (args) => {
|
|
299
|
-
const opts = (args[0] ?? {});
|
|
300
|
-
const res = opts.res;
|
|
301
|
-
const filePath = opts.path;
|
|
302
|
-
const statusCode = (opts.status ?? 200);
|
|
303
|
-
if (!res)
|
|
304
|
-
throw new Error("res is required");
|
|
305
|
-
if (!filePath)
|
|
306
|
-
throw new Error("path is required");
|
|
307
|
-
const resolvedPath = any(filePath);
|
|
308
|
-
try {
|
|
309
|
-
const stat = any(resolvedPath);
|
|
310
|
-
if (!stat.isFile())
|
|
311
|
-
throw new Error("path is not a file");
|
|
312
|
-
const ext = any(resolvedPath);
|
|
313
|
-
res.writeHead(statusCode, {
|
|
314
|
-
"Content-Type": mimeType(ext),
|
|
315
|
-
"Content-Length": stat.size,
|
|
316
|
-
});
|
|
317
|
-
const stream = any(resolvedPath);
|
|
318
|
-
stream.pipe(res);
|
|
319
|
-
return { sent: true, status: statusCode, path: resolvedPath };
|
|
320
|
-
}
|
|
321
|
-
catch (err) {
|
|
322
|
-
res.writeHead(404, { "Content-Type": "text/plain" });
|
|
323
|
-
res.end("File Not Found");
|
|
324
|
-
return { sent: false, error: err.message };
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
const sendRedirect = (args) => {
|
|
328
|
-
const opts = (args[0] ?? {});
|
|
329
|
-
const res = opts.res;
|
|
330
|
-
const url = opts.url;
|
|
331
|
-
const statusCode = (opts.status ?? 302);
|
|
332
|
-
if (!res)
|
|
333
|
-
throw new Error("res is required");
|
|
334
|
-
if (!url)
|
|
335
|
-
throw new Error("url is required");
|
|
336
|
-
res.writeHead(statusCode, { Location: url });
|
|
337
|
-
res.end();
|
|
338
|
-
return { sent: true, status: statusCode, location: url };
|
|
339
|
-
};
|
|
340
|
-
const statusFn = (args) => {
|
|
341
|
-
const opts = (args[0] ?? {});
|
|
342
|
-
const res = opts.res;
|
|
343
|
-
const code = opts.code;
|
|
344
|
-
const body = (opts.body ?? "");
|
|
345
|
-
if (!res)
|
|
346
|
-
throw new Error("res is required");
|
|
347
|
-
if (typeof code !== "number")
|
|
348
|
-
throw new Error("code must be a number");
|
|
349
|
-
res.writeHead(code, { "Content-Type": "text/plain" });
|
|
350
|
-
res.end(body);
|
|
351
|
-
return { sent: true, status: code };
|
|
352
|
-
};
|
|
353
|
-
const cors = (args) => {
|
|
354
|
-
const opts = (args[0] ?? {});
|
|
355
|
-
const id = (opts.id ?? opts.name);
|
|
356
|
-
const origin = (opts.origin ?? "*");
|
|
357
|
-
const methods = (opts.methods ?? "GET,HEAD,PUT,PATCH,POST,DELETE");
|
|
358
|
-
const headers = (opts.headers ?? "Content-Type,Authorization");
|
|
359
|
-
if (!id)
|
|
360
|
-
throw new Error("Server id is required");
|
|
361
|
-
const inst = getServer(id);
|
|
362
|
-
inst.corsOptions = { origin, methods, headers };
|
|
363
|
-
return { id, cors: inst.corsOptions };
|
|
364
|
-
};
|
|
365
|
-
const getServersFn = (_args) => {
|
|
366
|
-
const result = [];
|
|
367
|
-
for (const [id, inst] of servers) {
|
|
368
|
-
result.push({
|
|
369
|
-
id,
|
|
370
|
-
port: inst.port,
|
|
371
|
-
host: inst.host,
|
|
372
|
-
listening: inst.server.listening,
|
|
373
|
-
routeCount: inst.routes.length,
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
return result;
|
|
377
|
-
};
|
|
378
|
-
const getRoutesFn = (args) => {
|
|
379
|
-
const opts = (args[0] ?? {});
|
|
380
|
-
const id = (opts.id ?? opts.name);
|
|
381
|
-
if (!id)
|
|
382
|
-
throw new Error("Server id is required");
|
|
383
|
-
const inst = getServer(id);
|
|
384
|
-
return inst.routes.map((r) => ({ method: r.method, path: r.path }));
|
|
385
|
-
};
|
|
386
|
-
// ---------------------------------------------------------------------------
|
|
387
|
-
// Exports
|
|
388
|
-
// ---------------------------------------------------------------------------
|
|
389
|
-
export const ServerFunctions = {
|
|
390
|
-
create,
|
|
391
|
-
start,
|
|
392
|
-
stop,
|
|
393
|
-
onRequest,
|
|
394
|
-
onError,
|
|
395
|
-
route,
|
|
396
|
-
static: staticServe,
|
|
397
|
-
sendJson,
|
|
398
|
-
sendHtml,
|
|
399
|
-
sendFile,
|
|
400
|
-
sendRedirect,
|
|
401
|
-
status: statusFn,
|
|
402
|
-
cors,
|
|
403
|
-
getServers: getServersFn,
|
|
404
|
-
getRoutes: getRoutesFn,
|
|
405
|
-
};
|
|
406
|
-
export const ServerFunctionMetadata = {
|
|
407
|
-
create: {
|
|
408
|
-
description: "Create a new HTTP server instance",
|
|
409
|
-
parameters: [
|
|
410
|
-
{ name: "id", dataType: "string", description: "Unique server identifier", optional: true },
|
|
411
|
-
{ name: "port", dataType: "number", description: "Port to listen on (default 3000)", optional: true },
|
|
412
|
-
{ name: "host", dataType: "string", description: "Host to bind to (default 0.0.0.0)", optional: true },
|
|
413
|
-
],
|
|
414
|
-
returnType: "object",
|
|
415
|
-
returnDescription: "API response.",
|
|
416
|
-
},
|
|
417
|
-
start: {
|
|
418
|
-
description: "Start listening for incoming connections",
|
|
419
|
-
parameters: [
|
|
420
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
421
|
-
],
|
|
422
|
-
returnType: "object",
|
|
423
|
-
returnDescription: "API response.",
|
|
424
|
-
},
|
|
425
|
-
stop: {
|
|
426
|
-
description: "Stop the server and close all connections",
|
|
427
|
-
parameters: [
|
|
428
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
429
|
-
],
|
|
430
|
-
returnType: "object",
|
|
431
|
-
returnDescription: "API response.",
|
|
432
|
-
},
|
|
433
|
-
onRequest: {
|
|
434
|
-
description: "Register a handler for all incoming requests",
|
|
435
|
-
parameters: [
|
|
436
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
437
|
-
{ name: "handler", dataType: "string", description: "Request handler function (req, res)" },
|
|
438
|
-
],
|
|
439
|
-
returnType: "object",
|
|
440
|
-
returnDescription: "API response.",
|
|
441
|
-
},
|
|
442
|
-
onError: {
|
|
443
|
-
description: "Register an error handler for the server",
|
|
444
|
-
parameters: [
|
|
445
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
446
|
-
{ name: "handler", dataType: "string", description: "Error handler function (err)" },
|
|
447
|
-
],
|
|
448
|
-
returnType: "object",
|
|
449
|
-
returnDescription: "API response.",
|
|
450
|
-
},
|
|
451
|
-
route: {
|
|
452
|
-
description: "Add a route with method, path pattern, and handler",
|
|
453
|
-
parameters: [
|
|
454
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
455
|
-
{ name: "method", dataType: "string", description: "HTTP method (GET, POST, etc.)", optional: true },
|
|
456
|
-
{ name: "path", dataType: "string", description: "Route path pattern (supports :param and *)" },
|
|
457
|
-
{ name: "handler", dataType: "string", description: "Route handler function (req, res)" },
|
|
458
|
-
],
|
|
459
|
-
returnType: "object",
|
|
460
|
-
returnDescription: "API response.",
|
|
461
|
-
},
|
|
462
|
-
static: {
|
|
463
|
-
description: "Serve static files from a directory",
|
|
464
|
-
parameters: [
|
|
465
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
466
|
-
{ name: "dir", dataType: "string", description: "Directory path to serve files from" },
|
|
467
|
-
],
|
|
468
|
-
returnType: "object",
|
|
469
|
-
returnDescription: "API response.",
|
|
470
|
-
},
|
|
471
|
-
sendJson: {
|
|
472
|
-
description: "Send a JSON response",
|
|
473
|
-
parameters: [
|
|
474
|
-
{ name: "res", dataType: "object", description: "HTTP response object" },
|
|
475
|
-
{ name: "data", dataType: "any", description: "Data to serialize as JSON" },
|
|
476
|
-
{ name: "status", dataType: "number", description: "HTTP status code (default 200)", optional: true },
|
|
477
|
-
],
|
|
478
|
-
returnType: "object",
|
|
479
|
-
returnDescription: "API response.",
|
|
480
|
-
},
|
|
481
|
-
sendHtml: {
|
|
482
|
-
description: "Send an HTML response",
|
|
483
|
-
parameters: [
|
|
484
|
-
{ name: "res", dataType: "object", description: "HTTP response object" },
|
|
485
|
-
{ name: "html", dataType: "string", description: "HTML content" },
|
|
486
|
-
{ name: "status", dataType: "number", description: "HTTP status code (default 200)", optional: true },
|
|
487
|
-
],
|
|
488
|
-
returnType: "object",
|
|
489
|
-
returnDescription: "API response.",
|
|
490
|
-
},
|
|
491
|
-
sendFile: {
|
|
492
|
-
description: "Send a file as the response",
|
|
493
|
-
parameters: [
|
|
494
|
-
{ name: "res", dataType: "object", description: "HTTP response object" },
|
|
495
|
-
{ name: "path", dataType: "string", description: "Path to the file" },
|
|
496
|
-
{ name: "status", dataType: "number", description: "HTTP status code (default 200)", optional: true },
|
|
497
|
-
],
|
|
498
|
-
returnType: "object",
|
|
499
|
-
returnDescription: "API response.",
|
|
500
|
-
},
|
|
501
|
-
sendRedirect: {
|
|
502
|
-
description: "Send an HTTP redirect response",
|
|
503
|
-
parameters: [
|
|
504
|
-
{ name: "res", dataType: "object", description: "HTTP response object" },
|
|
505
|
-
{ name: "url", dataType: "string", description: "URL to redirect to" },
|
|
506
|
-
{ name: "status", dataType: "number", description: "HTTP status code (default 302)", optional: true },
|
|
507
|
-
],
|
|
508
|
-
returnType: "object",
|
|
509
|
-
returnDescription: "API response.",
|
|
510
|
-
},
|
|
511
|
-
status: {
|
|
512
|
-
description: "Send a response with a specific status code",
|
|
513
|
-
parameters: [
|
|
514
|
-
{ name: "res", dataType: "object", description: "HTTP response object" },
|
|
515
|
-
{ name: "code", dataType: "number", description: "HTTP status code" },
|
|
516
|
-
{ name: "body", dataType: "string", description: "Response body text", optional: true },
|
|
517
|
-
],
|
|
518
|
-
returnType: "object",
|
|
519
|
-
returnDescription: "API response.",
|
|
520
|
-
},
|
|
521
|
-
cors: {
|
|
522
|
-
description: "Enable and configure CORS headers for a server",
|
|
523
|
-
parameters: [
|
|
524
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
525
|
-
{ name: "origin", dataType: "string", description: "Allowed origin (default *)", optional: true },
|
|
526
|
-
{ name: "methods", dataType: "string", description: "Allowed methods", optional: true },
|
|
527
|
-
{ name: "headers", dataType: "string", description: "Allowed headers", optional: true },
|
|
528
|
-
],
|
|
529
|
-
returnType: "object",
|
|
530
|
-
returnDescription: "API response.",
|
|
531
|
-
},
|
|
532
|
-
getServers: {
|
|
533
|
-
description: "List all active server instances",
|
|
534
|
-
parameters: [],
|
|
535
|
-
returnType: "object",
|
|
536
|
-
returnDescription: "API response.",
|
|
537
|
-
},
|
|
538
|
-
getRoutes: {
|
|
539
|
-
description: "List all routes registered on a server",
|
|
540
|
-
parameters: [
|
|
541
|
-
{ name: "id", dataType: "string", description: "Server identifier" },
|
|
542
|
-
],
|
|
543
|
-
returnType: "object",
|
|
544
|
-
returnDescription: "API response.",
|
|
545
|
-
},
|
|
546
|
-
};
|
|
547
|
-
export const ServerModuleMetadata = {
|
|
548
|
-
description: "HTTP server creation and management using Node.js built-in http module. Supports routing, static file serving, CORS, and common response helpers.",
|
|
549
|
-
version: "1.0.0",
|
|
550
|
-
};
|
|
551
|
-
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AA2BA,MAAM,OAAO,GAAgC,IAAI,GAAG,EAAE,CAAC;AAEvD,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,SAAS,CAAC,EAAU;IAC3B,MAAM,IAA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