kisshan13 / exhancer.js

An enhancer for express js which includes file system routing, better error handling and much more !!!

Home Page:https://exhancer.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Exhancer

An enhancer for express js with built-in file system routing, error handlers and plugins (middlewares).

See Official Documentation

It's simply what you need in top of express js.

import exhancer, { zodError, mongoError } from "exhancer";
import * as path from "path";
import * as  url from "url";

const __filename = url.fileURLToPath(import.meta.url);
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));

const exhapp = new exhancer.Exhancer({ fsRouting: true, directory: path.resolve(__dirname, "src") })

exhapp.onError([zodError, mongoError]);

exhapp.run(4000, () => {
    console.log("Hello")
})

About

An enhancer for express js which includes file system routing, better error handling and much more !!!

https://exhancer.netlify.app

License:MIT License


Languages

Language:JavaScript 100.0%