@server/next 0.20.43 → 0.20.44
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/package.json +1 -1
- package/src/index.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@server/next",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.44",
|
|
4
4
|
"description": "A fully-fledged web server with routing, file uploads, sessions, static files, schema validation, websockets, testing, etc.",
|
|
5
5
|
"homepage": "https://server-js.com/",
|
|
6
6
|
"repository": "https://github.com/franciscop/server-next.git",
|
package/src/index.js
CHANGED
|
@@ -79,11 +79,11 @@ server.prototype.self = function () {
|
|
|
79
79
|
// #region Runtimes
|
|
80
80
|
// Node.js
|
|
81
81
|
server.prototype.node = async function () {
|
|
82
|
+
const options = config(this.opts);
|
|
82
83
|
const http = await import("http");
|
|
83
84
|
http
|
|
84
85
|
.createServer(async (request, response) => {
|
|
85
86
|
try {
|
|
86
|
-
const options = config(this.opts);
|
|
87
87
|
const ctx = await createNodeContext(request, options, this);
|
|
88
88
|
const out = await handleRequest(this.handlers, ctx);
|
|
89
89
|
|
|
@@ -100,7 +100,7 @@ server.prototype.node = async function () {
|
|
|
100
100
|
response.end();
|
|
101
101
|
}
|
|
102
102
|
})
|
|
103
|
-
.listen(
|
|
103
|
+
.listen(options.port);
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
// Netlify
|
|
@@ -210,7 +210,7 @@ server.prototype.test = function () {
|
|
|
210
210
|
options.headers.cookie = cookie;
|
|
211
211
|
}
|
|
212
212
|
const res = await this.fetch(
|
|
213
|
-
new Request("http://localhost:3000" + path, options)
|
|
213
|
+
new Request("http://localhost:3000" + path, options),
|
|
214
214
|
);
|
|
215
215
|
|
|
216
216
|
const headers = parseHeaders(res.headers);
|