Skip to content

Commit 7df92b7

Browse files
committed
(docs) added docs
1 parent 3878dea commit 7df92b7

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "exhancer",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A package for building robust express application with ease.",
55
"main": "index.js",
66
"type": "module",

readme.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1+
12
# Exhancer
3+
4+
An enhancer for express js with built-in file system routing, error handlers and plugins (middlewares).
5+
6+
7+
8+
9+
It's simply what you need in top of express js.
10+
11+
```javascript
12+
import exhancer, { zodError, mongoError } from "exhancer";
13+
import * as path from "path";
14+
import * as url from "url";
15+
16+
const __filename = url.fileURLToPath(import.meta.url);
17+
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
18+
19+
const exhapp = new exhancer.Exhancer({ fsRouting: true, directory: path.resolve(__dirname, "src") })
20+
21+
exhapp.onError([zodError, mongoError]);
22+
23+
exhapp.run(4000, () => {
24+
console.log("Hello")
25+
})
26+
```
27+
28+

0 commit comments

Comments
 (0)