/flitz

A lightweight and extremly fast HTTP server with all basics.

Primary LanguageTypeScriptMIT LicenseMIT

npm

flitz

flitz [ˈflɪt͡s] is a lightweight and extremly fast HTTP server with all basics for Node 10+, wriiten in TypeScript.

Install

Run

npm install --save flitz

from the folder, where your package.json is stored.

Usage

const flitz = require('flitz').default;

const run = async () => {
  const app = flitz();

  app.get('/', async (req, res) => {
    res.write('Hello world!');
    res.end();
  });

  await app.listen(3000);
};

run();

Or the TypeScript way:

import flitz from 'flitz';

const run = async () => {
  const app = flitz();

  app.get('/', async (req, res) => {
    res.write('Hello world!');
    res.end();
  });

  await app.listen(3000);
};

run();

TypeScript

TypeScript is optionally supported. The module contains its own definition files.

License

MIT © Marcel Kloubert