This repository was 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.
reewrite package to reduce depencies (#4)
Rewrite package to reduce dependencies and smaller functions
- Loading branch information
1 parent
6b5e270
commit f2353be
Showing
21 changed files
with
1,010 additions
and
2,207 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,20 +1,12 @@ | ||
{ | ||
"name": "neste", | ||
"description": "a express fork", | ||
"version": "2.0.6", | ||
"version": "3.0.0", | ||
"author": "Matheus Sampaio Queiroga <[email protected]>", | ||
"license": "MIT", | ||
"type": "commonjs", | ||
"main": "./export/index.cjs", | ||
"types": "./export/index.d.ts", | ||
"default": "./export/index.mjs", | ||
"exports": { | ||
".": { | ||
"require": "./export/index.cjs", | ||
"default": "./export/index.mjs", | ||
"types": "./export/index.d.ts" | ||
} | ||
}, | ||
"type": "module", | ||
"main": "./src/index.js", | ||
"types": "./src/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Sirherobrine23/neste.git" | ||
|
@@ -25,7 +17,6 @@ | |
"keywords": [ | ||
"express", | ||
"framework", | ||
"sinatra", | ||
"web", | ||
"http", | ||
"rest", | ||
|
@@ -42,38 +33,18 @@ | |
"postpack": "tsc --build --clean" | ||
}, | ||
"devDependencies": { | ||
"@types/accepts": "^1.3.5", | ||
"@types/busboy": "^1.5.0", | ||
"@types/content-disposition": "^0.5.5", | ||
"@types/content-type": "^1.1.5", | ||
"@types/cookie": "^0.5.1", | ||
"@types/encodeurl": "^1.0.0", | ||
"@types/escape-html": "^1.0.2", | ||
"@types/finalhandler": "^1.2.0", | ||
"@types/node": "^20.4.9", | ||
"@types/proxy-addr": "^2.0.0", | ||
"@types/qs": "^6.9.7", | ||
"@types/range-parser": "^1.2.4", | ||
"@types/send": "^0.17.1", | ||
"@types/type-is": "^1.6.3", | ||
"@types/vary": "^1.1.0", | ||
"@types/ws": "^8.5.5", | ||
"@types/busboy": "^1.5.2", | ||
"@types/cookie": "^0.5.3", | ||
"@types/node": "^20.8.9", | ||
"@types/ws": "^8.5.8", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.1.6" | ||
"typescript": "^5.2.2" | ||
}, | ||
"dependencies": { | ||
"accepts": "^1.3.8", | ||
"busboy": "^1.6.0", | ||
"content-disposition": "^0.5.4", | ||
"content-type": "^1.0.5", | ||
"cookie": "^0.5.0", | ||
"finalhandler": "^1.2.0", | ||
"path-to-regexp": "^6.2.1", | ||
"proxy-addr": "^2.0.7", | ||
"qs": "^6.11.2", | ||
"send": "^0.18.0", | ||
"type-is": "^1.6.18", | ||
"vary": "^1.1.2", | ||
"ws": "^8.13.0" | ||
"ws": "^8.14.2", | ||
"yaml": "^2.3.3" | ||
} | ||
} |
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)); |
Oops, something went wrong.