@stacksjs/router 0.58.49 → 0.58.51
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/index.js +1 -2
- package/package.json +1 -1
- package/src/server.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -159,9 +159,8 @@ var request = new Request;
|
|
|
159
159
|
// src/server.ts
|
|
160
160
|
import {extname as extname2} from "path";
|
|
161
161
|
import {URL} from "url";
|
|
162
|
-
import {localUrl} from "@stacksjs/config";
|
|
163
162
|
async function serve(options = {}) {
|
|
164
|
-
const hostname = options.host ||
|
|
163
|
+
const hostname = options.host || "localhost";
|
|
165
164
|
const port = options.port || 3000;
|
|
166
165
|
Bun.serve({
|
|
167
166
|
hostname,
|
package/package.json
CHANGED
package/src/server.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { extname } from 'node:path'
|
|
2
2
|
import { URL } from 'node:url'
|
|
3
3
|
import type { MiddlewareType, Route, StatusCode } from '@stacksjs/types'
|
|
4
|
-
import { localUrl } from '@stacksjs/config'
|
|
5
4
|
import { middlewares } from './middleware'
|
|
6
5
|
import { request } from './request'
|
|
7
6
|
import { route } from '.'
|
|
@@ -13,7 +12,8 @@ interface ServeOptions {
|
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
export async function serve(options: ServeOptions = {}) {
|
|
16
|
-
|
|
15
|
+
// maybe make use of localUrl({ type: 'backend' }) here & options.tunnel
|
|
16
|
+
const hostname = options.host || 'localhost'
|
|
17
17
|
const port = options.port || 3000
|
|
18
18
|
|
|
19
19
|
Bun.serve({
|