surendar-yama-joy-server
v1.0.4
Published
wrapper for expressjs
Downloads
3
Maintainers
Keywords
Readme
surendar-yama-joy-server
npm i surendar-yama-joy-server
/**
* 👽 app listen
* 🧜🏽♂️ register endpoint
* 🦕 register middleware
* 👑 app.set method in express
*/
import { bootApp } from "surendar-yama-joy-server";
const dispatch = bootApp();
const middlewares = { before: [], after: [] };
dispatch({
type: "👽",
payload: {
port: 9999,
},
});
dispatch({
type: "🧜🏽♂️",
payload: {
path: "/",
method: "get",
middlewares,
controller: function (req, res) {
res.send("Hello World");
},
},
});