HamJS mini HTTP Server library


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
Minified + gzip package size for @hamjs/http in KB



This is a mini HTTP server library for NodeJS.

Why @hamjs/http?

This library is very fast as it is zero dependency.


Run this command in your project directory!

$ npm install @hamjs/http


Before you use @hamjs/http, you have to require it. Example, below.

const http = require('@hamjs/http');

Then, you can create and listen the server. Example, below.

const app = new Http();
// routing here
app.listen(PORT, callback);

To add route, you can use the router. Example, below.

app.router.get(PATH, handler);

The handler look like here.

(ctx) => {

Full example code.

const Http = require('@hamjs/http');

const app = new Http();

app.router.get('/', (ctx) => {
  ctx.send('halo ');

app.listen(8080, () => {
  console.log('app start');

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.