npm.io
0.0.18 • Published 6 years agoCLI

xila

Licence
MIT
Version
0.0.18
Deps
0
Size
11 kB
Vulns
0
Weekly
0

Xila

A minimal node.js server

Usage

Setting up a server

import * as xila from "xila";

const server = xila.serve("Welcome to Xila!");

server.listen(4001);

Sample routes

A sample JSON route can be registered as:

import * as xila from "xila";

const server = xila.serve(
    xila.get("/pranav", xila.json({hello: 'there'})));

server.listen(4000);

server.on("error", console.log);