0.2.7 • Published 4 years ago

vitro v0.2.7

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

vitro

Version Build Coverage License

Experimental Fetch API based web framework.

Installation

npm install vitro

Usage

CLI

Create an index.js file and export a function that accepts Request object and returns imported Response object (supports promises).

const { Response } = require('vitro');

module.exports = request => new Response('Welcome to server, Fetch API!');

Add to you package.json:

{
  "main": "index.js",
  "scripts": {
    "start": "vitro"
  }
}

Start server with:

npm start

Go to http://localhost:3000

Use vitro --help for more info.

Programmatic use

const vitro = require('vitro');
const { Response } = vitro;

const server = vitro(request => new Response('Welcome to server, Fetch API!'));

server.listen(3000);

Go to http://localhost:3000

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.2

5 years ago

0.0.1

5 years ago