JDOG787 / webie

A lightweight http framework focused on simplicity.

Home Page:https://npmjs.org/webie

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webie

A lightweight http framework focused on simplicity.

Usage

import webie from "webie";
const web = webie(8080);

// WIP 
web.middleware((req, res, next) => {
    console.log(req);
    next();
});

web.get("/", (req, res) => {
    res.send("hello world");
});

web.get("/json", (req, res) => {
    res.json({ msg: "hello world" });
});

web.get("/queries", (req, res) => {
    const query = req.query.test;
    res.send(query ? query : "Send a query");
});

About

A lightweight http framework focused on simplicity.

https://npmjs.org/webie

License:MIT License


Languages

Language:TypeScript 89.4%Language:JavaScript 10.6%