tinny-backend 1.0.6 → 1.0.7

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.
@@ -1,4 +1,5 @@
1
1
  import type { ServerOptions, ServerRes, Handlers, AddOption, HandlerFun, Decorator, Logs, DirFiles } from "./types.js";
2
+ import * as http from "http";
2
3
  export default class Server {
3
4
  private PORT;
4
5
  private hostname;
@@ -12,6 +13,7 @@ export default class Server {
12
13
  private ServerName;
13
14
  private defaultHandler;
14
15
  getMethodHandlers(): Handlers[];
16
+ getHttpServer(): http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
15
17
  getDecorators(): Decorator[];
16
18
  getUpTime(): number;
17
19
  getReqCount(): number;
@@ -23,6 +23,9 @@ export default class Server {
23
23
  getMethodHandlers() {
24
24
  return this.methodHandler;
25
25
  }
26
+ getHttpServer() {
27
+ return this.server;
28
+ }
26
29
  getDecorators() {
27
30
  return this.decorators;
28
31
  }
@@ -1 +1 @@
1
- export declare const VERSION = "1.0.6";
1
+ export declare const VERSION = "1.0.7";
@@ -1 +1 @@
1
- export const VERSION = "1.0.6";
1
+ export const VERSION = "1.0.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinny-backend",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A lightweight and flexible backend framework built on Node.js.",
5
5
  "license": "MIT",
6
6
  "author": {
package/dist/tester.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/tester.js DELETED
@@ -1,10 +0,0 @@
1
- import Server from "./core/Server.js";
2
- const srv = new Server({});
3
- srv.add({
4
- path: "/",
5
- method: "POST",
6
- handler: (req, res) => {
7
- res.send(200, { message: "Hello" });
8
- }
9
- });
10
- srv.listen();