@fearless/fearless

0.1.1 • Public • Published

Fearless

⚡️microframework focused on productivity and performance so that developers can work less is to produce more without having risks in compromising performance

🎩   Features

  • 🧘 Zero config and easy. Made to start and use.
  • ⚡️ Blazing Fast. Support uWS(C++) where you have more performance.
  • 🎛 Pluggable. With middlewares
  • 🔐 Typescript Support. We have a full support for your type definitions.

🗃   Examples

Install

yarn

yarn add @fearless/fearless

npm

npm install @fearless/fearless

GET example

const fearless = require("@fearless/fearless")
const { get, send } = require("@fearless/fearless")

const ping = get("/ping", (req, res) => send(res, 200, "ping =D!"))

fearless([ping])

Async/Await example

const fearless = require("@fearless/fearless")
const { get, send, sendAsync } = require("@fearless/fearless")

const helloWorld = get("/ping", (req, res) =>
  sendAsync(res, 200, async () => "Hello, World")
);

fearless([helloWorld])

Body JSON with POST

const fearless = require("@fearless/fearless")
const { post, sendAsync } = require("@fearless/fearless")
const json = require("@fearless/json")

const postExample = post("/", (req, res) => {
  sendAsync(res, 200, async () => {
    const data = await json(res)
    return data
  })
}

fearless([postExample])

/@fearless/fearless/

    Package Sidebar

    Install

    npm i @fearless/fearless

    Weekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    327 kB

    Total Files

    7

    Last publish

    Collaborators

    • rodrigooler