xila

A node.js server

Usage no npm install needed!

<script type="module">
  import xila from 'https://cdn.skypack.dev/xila';
</script>

README

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);