@kichu12348/bunify 1.0.2 → 1.0.4

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 CHANGED
@@ -9,7 +9,7 @@ A fast, lightweight, and strictly-typed web framework built specifically for [Bu
9
9
  Since Bunify relies on native Bun features, ensure you have [Bun installed](https://bun.sh/).
10
10
 
11
11
  ```bash
12
- bun add bunify
12
+ bun add @kichu12348/bunify
13
13
  ```
14
14
 
15
15
  ## Quick Start
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kichu12348/bunify",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/kichu12348/bunify.git"
package/src/core.ts CHANGED
@@ -360,9 +360,13 @@ export class Bunify<Decorators extends Record<string, any> = {}> {
360
360
  this.addRoute("PATCH", path, handlers);
361
361
  }
362
362
 
363
- listen(port: number, callback?: (address: string) => void) {
363
+ listen(
364
+ { port, host = "" }: { port: number; host?: string },
365
+ callback?: (address: string) => void,
366
+ ) {
364
367
  const server = Bun.serve({
365
368
  port: port,
369
+ hostname: host,
366
370
  routes: this.routes,
367
371
  fetch: async () => {
368
372
  return new Response("Not Found", { status: 404 });