This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: GitHub <[email protected]>
- Loading branch information
1 parent
2ba7b9f
commit e2a32c2
Showing
9 changed files
with
125 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { tmpdir } from "os"; | ||
import neste, { parseBody } from "./index.js"; | ||
const app = neste(), app2 = neste(); | ||
|
||
app.use(parseBody({ formData: { tmpFolder: tmpdir() }, formEncoded: { limit: -1 } })); | ||
|
||
app.all("/", ({ path, reqPath, hostname, app, body }, res) => res.json({ path, reqPath, hostname, sets: Array.from(app.settings.entries()), body })); | ||
|
||
app.use(app2).use("/gg", app2); | ||
app2.settings.set("json space", 4); | ||
app2.get("/gg", ({ path, reqPath, hostname, app, body }, res) => res.json({ path, reqPath, hostname, sets: Array.from(app.settings.entries()), body })); | ||
|
||
app.listen(3000, () => console.log("Listen on %s", 3000)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import { CookieManeger, Handlers, ErrorRequestHandler, RequestHandler, WsRequestHandler, Layer, NextFunction, Request, Response, WsResponse } from "./handler.js"; | ||
import { Neste, Router, RouterSettings, RouterSettingsConfig } from "./application.js"; | ||
import { CookieManeger, Layer, Request, Response, WsResponse } from "./handler.js"; | ||
import { Neste, Router, RouterSettings, WsRoom } from "./application.js"; | ||
|
||
export { staticFile } from "./middles/staticFile.js"; | ||
export { parseBody } from "./middles/bodyParse.js"; | ||
export type { FileStorage, LocalFile, ParseBodyOptions } from "./middles/bodyParse.js"; | ||
|
||
export type { Handlers, ErrorRequestHandler, RequestHandler, WsRequestHandler, NextFunction } from "./handler.js"; | ||
export type { RouterSettingsConfig } from "./application.js"; | ||
|
||
function router() { return new Router(); } | ||
function neste() { return new Neste(); } | ||
export { neste, router, CookieManeger, Handlers, ErrorRequestHandler, RequestHandler, WsRequestHandler, Layer, NextFunction, Request, Response, WsResponse, Neste, Router, RouterSettings, RouterSettingsConfig }; | ||
export { neste, router, CookieManeger, Layer, Request, Response, WsResponse, Neste, Router, RouterSettings, WsRoom }; | ||
export default neste; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters