millie

1.2.1 • Public • Published

millie

A small, zero dependency HTTP library for Node.JS

Have a question? Join the discord!

Discord Server NPM

Features 📜

  • Easy to use
  • Small, around 2kb
  • No dependencies
  • Named after my cat 😁

Basic Usage

let millie = require("millie").millie;

let app = new millie(3000, {
  auth_secret: "api token or password for auth (optional)",
});

app.initialize();

app.request("/api", (req, res) => {
  res.status(200); //not really necessary unless you want to change the status code before responding
  res.message("status message"); //not really necessary if you use the custom respond() function

  res.respond(200, { successful: "your request was successful" }); //body can also be a string
});

Roadmap

  • Custom request properties and functions

  • More custom functions and properties for the response

  • Local app storage

Readme

Keywords

Package Sidebar

Install

npm i millie

Weekly Downloads

1

Version

1.2.1

License

ISC

Unpacked Size

8.41 kB

Total Files

6

Last publish

Collaborators

  • ferretcode