Skip to content

Commit

Permalink
Merge branch 'main' of github.com:unjs/listhen
Browse files Browse the repository at this point in the history
  • Loading branch information
Mastercuber committed Aug 2, 2023
2 parents b033d98 + c8388f1 commit 4320002
Show file tree
Hide file tree
Showing 9 changed files with 662 additions and 814 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"dev": "vitest",
"lint": "eslint --ext .ts . && prettier -c src test",
"lint:fix": "eslint --fix --ext .ts . && prettier -w src test",
"play": "jiti test/fixture/app",
"listhen": "node ./scripts/listhen.mjs",
"play": "node ./scripts/listhen.mjs -w ./playground",
"release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
"test": "pnpm lint && vitest run --coverage"
},
Expand All @@ -52,15 +53,16 @@
"devDependencies": {
"@types/node": "^20.4.5",
"@types/node-forge": "^1.3.4",
"@vitest/coverage-v8": "^0.33.0",
"@vitest/coverage-v8": "^0.34.1",
"changelogen": "^0.5.4",
"eslint": "^8.46.0",
"eslint-config-unjs": "^0.2.1",
"h3": "^1.8.0-rc.2",
"ip-regex": "^5.0.0",
"prettier": "^3.0.0",
"typescript": "^5.1.6",
"unbuild": "^2.0.0-rc.0",
"vitest": "^0.33.0"
"vitest": "^0.34.1"
},
"packageManager": "pnpm@8.6.10"
}
}
8 changes: 8 additions & 0 deletions playground/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { createApp, eventHandler } from "h3";

export const app = createApp();

app.use(
"/",
eventHandler(() => ({ hello: "world!" })),
);
4 changes: 4 additions & 0 deletions playground/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { toNodeListener } from "h3";
import { app } from "./app";

export default toNodeListener(app);
Loading

0 comments on commit 4320002

Please sign in to comment.