flitz [ˈflɪt͡s] is a lightweight and extremly fast HTTP server with all basics for Node 10+, wriiten in TypeScript.
Run
npm install --save flitz
from the folder, where your package.json
is stored.
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 is optionally supported. The module contains its own definition files.
MIT © Marcel Kloubert