slimjim
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

SlimJim

A razor thin, lightning fast web framework for rest api's

Description

SlimJim is for when really only need the basics. It is meant for a very specific purpose and that purpose only; building microservice style rest api's.

Example

import {SlimJim} from "slimjim";
 
const server = new SlimJim();
 
server.get("/test/:thing", (req, done) => {
    done(null, {
        statusCode: 200,
        headers: {},
        body: req,
    });
});
 
server.post("/submit", (req, done) => {
   done(null, {
       statusCode: 200,
       headers: {Thing: "yay"},
       body: req.body.potato,
   });
});
 
server.start(8080, undefined, () => {
    console.log("Server started");
});

Features

  • Body parsing
  • Lightning fast speeds
  • Simple api

Caveats

  • Very early, and indev

Version History

v0.2.0

  • Complete rewrite for turbo-http

v0.1.3

  • Fix typings path

v0.1.2

  • Fix for dep

v0.1.1

  • Small performance optimizations
  • Clarified example

v0.1.0

  • Initial release

Readme

Keywords

none

Package Sidebar

Install

npm i slimjim

Weekly Downloads

6

Version

0.3.2

License

MIT

Unpacked Size

7.82 kB

Total Files

8

Last publish

Collaborators

  • johnconley