Skip to content

miloserdev/xross

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d385283 ยท Jan 27, 2023

History

4 Commits
Jan 19, 2023
Jan 19, 2023
Jan 19, 2023
Jan 27, 2023

Repository files navigation

xross

A simple NodeJS HTTP/HTTPS web router

const http = require("http");
const Xross = require("xross");
const app = Xross({ body_parser: true, debug: true });

app.route("/*", { method: "ANY" }, (req, res, next) => {
	res.setHeader('Content-Type', 'application/json');
	res.writeHead(200);
	res.end( JSON.stringify({ "response": "working" }) );
	next();
});

const server = http.createServer(app);
server.listen(port, host, () => {
	console.log(`Server is running`);
});

Install

npm install xross

Features

  • Scalable ๐ŸŒ
  • Lightweight ๐Ÿชถ
  • High performance ๐Ÿš€
  • Fast URL match ๐Ÿท๏ธ
  • Full RexExp support ๐Ÿ“œ

Releases

No releases published

Packages

No packages published