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 🙏

© 2025 – Pkg Stats / Ryan Hefner

route-scout

v1.0.4

Published

A framework that handles the routing for you and makes your server-creating life much easier. Also makes you look younger and more attractive. Results may vary.

Readme

Build Status

Route Scout - Finds the paths for you!

A framework that handles the routing for you and makes your server-creating life much easier. Also makes you look younger and more attractive. Results may vary.

Features

  • easy to use
  • simplifies using all common routing requests
  • lets you create your own routing requests
  • built in handler for static files
  • lets add variables to your routes
  • lightweight

Is it any good?

Yes.

Installation

$ npm install route-scout

Getting Started

Route-Scout relies on the built in http node module as demonstrated below.

const routescout = require('route-scout');
const server = require('http');

routescout.get('/', (req, res) => {
  res.write( 'Hello World!' );
  res.end();
});

server.createServer(routescout.routes()).listen(9000);

Framework Methods

  • routescout.get( path, callback )

Creates a route for incoming GET requests at the passed in URL, the callback takes two arguments: request and response.

GET requests retrieve data form the server. GET reads.

  • routescout.post( path, callback )

Creates a route for incoming POST requests at the passed in URL, the callback takes two arguments: request and response.

POST requests are used to send data to the server. POST creates.

  • routescout.patch( path, callback )

Creates a route for incoming PATCH requests at the passed in URL, the callback takes two arguments: request and response.

PATCH requests change data on the server. PATCH updates/modifies

  • routescout.put( path, callback )

Creates a route for incoming PUT requests at the passed in URL, the callback takes two arguments: request and response.

PUT requests change or replace data on the server. PUT updates/replaces

  • routescout.delete( path, callback )

Creates a route for incoming DELETE requests at the passed in URL, the callback takes two arguments: request and response.

DELETE requests delete data from the server.

  • routescout.createRoute( object )

Creates a route for whatever you want to create a route for at the passed in URL. The object requires three keys: URL, method and handler. Method must be all uppercase!

  • routescout.static( path )

Serves static objects from the folder located in path.

Examples

var routescout = require( 'routescout' );

// GET Request
routescout.get( '/examplePath', (req, res) => {
  res.write ( 'GET request to the homepage.' );
  res.end();
});

// POST Request
routescout.post( '/examplePath', (req, res) => {
  res.write ( 'POST request to the homepage.' );
  res.end();
});

// PATCH Request
routescout.patch( '/examplePath', (req, res) => {
  res.write ( 'PATCH request to the homepage.' );
  res.end();
});

// PUT request
routescout.put( '/examplePath', (req,res) => {
  res.write ( 'PUT request to the homepage.');
  res.end();
});

// DELETE Request
routescout.delete( '/examplePath', (req, res) => {
  res.write ( 'DELETE request to the homepage.' );
  res.end();
});

// CREATE ROUTE Request
routescout.createRoute( {
  url: '/example/path',
  method: 'HEAD',
  handler: (req, res) => {
    res.write ( 'HEAD request to the homepage.' );
    res.end();
  })
});

// Static handler
routescout.static( '/public');


Options

URL Variables and Request Parameters

For URL you can add a variable with a : and this will pass it to the request object with a property of params.

// Parameters in the Request object
routescout.get( '/examplePath/:variable', (req, res) => {
  res.write ( 'Access variable' + req.params.variable );
  res.end();
});

Dependencies

None. We're independent that way :)

Dev Dependencies