@stacksjs/router 0.58.50 → 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 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 || options.tunnel ? await localUrl({ type: "backend" }) : "127.0.0.1";
163
+ const hostname = options.host || "localhost";
165
164
  const port = options.port || 3000;
166
165
  Bun.serve({
167
166
  hostname,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/router",
3
3
  "type": "module",
4
- "version": "0.58.50",
4
+ "version": "0.58.51",
5
5
  "description": "The Stacks framework router.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
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
- const hostname = options.host || options.tunnel ? await localUrl({ type: 'backend' }) : '127.0.0.1'
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({