npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

falanteris

v1.4.15

Published

humble node server

Readme

Important Note:

This is not the finished version of the README, it only covers basic and smaller features.

Basics

Falanteris is a multi-functional framework that you can use to build a REST-api or a web development framework.

It shares design aspects from Express, a more popular REST-api framework, but it combines smaller aspects from Flask as well.

To get started, we'll need our app constructor, we can require the Falanteris function from the package. var Falanteris = require("falanteris").Falanteris let app = Falanteris("0.0.0.0",undefined,"http")

The constructor requires 4 arguments: 1. Network Interface you're going to run it in. 2. Dependency ( you can simply supply it with undefined to ignore, but we'll get to this later 3. protocol, which can be either http or https 4. https credentials, which should be supplied with an object consisting of key, and cert property.

Adding redirections

Now that we have our app ready, time to add some redirections, using the addRedir method fromt the app object.

app.addRedir(<method>,<endpoint>,<handler>,<middlewares>)

  1. The method can be either "GET", "POST", "PUT", and "DELETE" which can be supplied either by string. If you want a specific endpoint to have multiple redirections you can supply this argument with an array like ["GET","POST"].
  2. The endpoint is pretty self explanatory, but its pretty much the URL that needs to be accessed.
  3. the handler is a function that would be supplied with req, and res variables.
  4. middlewares is a list of functions that would be passed through by the request before entering the handler. The functions must consist of 3 parameters, req and res object, as well as thenext function.

Using URL as parameter

Often times, when developing a REST-api, this is a staple feature that is needed. Falanteris got that covered. In order to use the feature, we'll need to specify the exact location where the parameter is located using the [] square bracket.

Example: `/login/[username]/password/[password]``

Now, the parameters should be stored in the req object, particularly in the rawParam property of it. To get the username you can call req.rawParam.username to retrieve the username specified in the URL. The same can be done with password.

Queries are also stored in a similar manner. In the rawQuery property of the req object.

Using Middlewares

Middlewares are useful when you want to run a checking pipeline towards incoming requests. Simply create a common function that takes three parameters, req, res, and next. The req and res object are similar to the ones you would use in your request handler. The next parameter contains the next middleware that needs to be run. After done performing necessary actions, you can invoke the next function to call the 'next' middleware in the pipeline.

Example: function myMware(req, res, next){ console.log("Checked by middleware"); next(); }

You can then deploy this middleware by inserting it into the last parameter of addRedir method in an array

app.addRedir(.., ..., ..., [myMware])

Final Notes

Now of course, you can export the whole app by using module.exports

Example: module.exports = app

Neat Little Features

  1. app.verbosity(); This feature would make the app verbose, displaying errors and partial information about the incoming request.

  2. app.enableMP(<number of cores>) An API to run multi-processing. You can specify how many cores you wish to use. Of course, it also considers the number of processors your machine has.