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

noddity-service-server

v2.2.0

Published

A server for making servers

Readme

Use this module if you want to make a server-side service for noddity.com blogs. It handles the going out and fetching of posts and the index, and leaves your code to turn parse that however it wills.

The idea is to have a node.js server running out on the internet that you can link to from your Noddity site, running on static file hosting somewhere else, anv have the node server able to respond dynamically to requests, based on the data in the relevant Noddity store.

The server always requires that noddityRoot and postUrlRoot parameters be passed in via the url. It uses those to rustle up a Noddity Butler (which it will cache) for your service to use to reference the posts and stuff.

Here's an example URL that fires up the [rssaas] Noddity service on one of my servers:

http://rss.noddityaas.com/?noddityRoot=http://joshduff.com/content/&postUrlRoot=http://joshduff.com/%23!/post/&title=Josh%20Duff%20.com&author=Josh

The noddityRoot and postUrlRoot parameters are there, as the server requires, and the rest of the arguments are there for the benefit of the rssaas service.

This server exports a single function that takes your server implementation, and returns a node http server.

var noddityServiceServer = require('noddity-service-server')

var httpServer = noddityServiceServer(yourServerFunction)

httpServer.start(8080)

Your server function will be passed to arguments: a big 'ol context object with everything you need to access a Noddity data store, and an error-first callback function whose second argument should be a string that will be returned in the response the client.

If you have a use case that could use streams, I would be open to a pull request to add that.

function yourServerImplementation(context, cb) {
	var url = context.url
	var parameters = context.parameters
	var butler = context.butler
	var linkify = conxext.linkify
	var resolvePost = context.resolvePost

	if (typeof parameters.postName === 'undefined') {
		cb(new Error('Must provide the postName parameter!'))
	} else {
		butler.getPost(parameters.postName, function(err, post) {
			cb(err, 'The post title is: ' + post.metadata.title)
		})
	}
}

The context parameters will be:

  • url: the url from the http request
  • parameters: an object whose parameters are the parameters that were passed in via the url. The values will all be strings.
  • butler: a noddity-butler object pointing at the appropriate Noddity store
  • linkify: a noddity-linkifier function that will resolve post links to the appropriate url
  • resolvePost: a dumb function that mashes up two parts of a url together (making sure not to double up on the slashes)

Check out rssaas and seoaas for examples of such services.

I like to launch these services with ploy. To do the same, you can just create a server.js file containing something like

var noddityServer = require('noddity-service-server')
var thisParticularImplementation = require('./index.js')
noddityServer(thisParticularImplementation).listen(process.env.PORT)