File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " exhancer" ,
3
- "version" : " 1.0.0 " ,
3
+ "version" : " 1.0.1 " ,
4
4
"description" : " A package for building robust express application with ease." ,
5
5
"main" : " index.js" ,
6
6
"type" : " module" ,
Original file line number Diff line number Diff line change
1
+
1
2
# 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
+
You can’t perform that action at this time.
0 commit comments