Table of Contents
About
This is a minimalistic Web framework for Node.js. It helps you create RESTful APIs.
The idea is to have 0 dependencies while still have all the functionality you would expect from bigger frameworks like Express, Koa, Fastify etc with just a fraction of the footprint.
Install
npm install quarkhttp
Features
-
Create routes supporting GET, POST, PUT, DELETE HTTP Verbs. There are convenience methods for this:
appappappapp -
Reads posted body to either Text or JSON. Use method
bodyParse(method)
to change how the body is parsed. Valid input valuesjson
ortext
. -
Has middleware that you can run before handling the actual request. Can be used for Authentication for example.
app -
Handles route parameters and query parameters
Router parameters
appQuery parameters
app
Create an app
const quark = ; const app = ; // ROUTE PARAMETERSapp; app // POSTapp // PUTapp // MIDDLEWAREapp // Starts listening to requestsapp