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

turnpike

v0.4.0-pre.1

Published

A lightweight HMVC framework with flexible opinions.

Downloads

120

Readme

turnpike

Build Status Code Climate

A stylistically permissive, flexible HMVC framework for Node.js

Built on Connect, Hooks and Underscore, Turnpike aims to provide a similar productivity boost as other MVC frameworks that include code generators, but with the additional boost to code reusability that comes with the HMVC pattern. If you come from Rails or similar frameworks, you should find the transition to Turnpike reasonably painless. Developers coming from a framework like Kohana should feel at home, and might even learn to enjoy having code generators. The main difference for these developers will be that a Turnpike server doesn't talk to itself over the network to handle the heirarchy.

Features:

  • Hierachical page building. Every page region can be assgned its own MVC triad, which can then call down a tree of further MVC triads to build each page component. (note, this currently requires a bit of a kludge to get the partials to come back up the triad, rather than try and fail to deliver over the connection. This will be fixed soon.)
  • Automatic view class building from folders full of templates. Just name your folder and the Jade templates inside correctly, and Turnpike does the rest.
  • Automatically manages worker processes for high availability and optimal performance in a multi-CPU production environment.
  • Rich pre/post hook system to give ample opportunities to alter the behavior of your app without needing to reinvent framework functions
  • Smart configuration system that automatically provides a fallback chain from Environment variables to project defaults and finally framework defaults.
  • Access control rules are automatically loaded from a separate module than the controller providing the endpoints being secured. This provides a nice, natural separation of concerns for access rules.
  • RESTful response format negotiation. Built-in support for HTML, and JSON responses, which are automatically negotiated based on the Accept header from the client. Adding additional formats is done on a per-controller basis (project-wide is coming soon) and is very straightforward.
  • Sessions set up using Connect, you just need to pick a storage engine and pass it into one method call.
  • Useful session extensions, like attaching messages for the user
  • Command line tools for stub generation, route verification

Future Roadmap:

  • Plug-in API
  • A form building API with CSRF protection (based on Connect, of course)
  • Automatic router endpoints based on controller names.
  • Multipart file uploads made easy.
  • Compile back-end templates into front-end Javascript code.
  • Pluggable template engines
  • Simplify new project generation and setup down to one or two commands.

Getting started

$ npm install -g turnpike
$ turnpike create project Turnpike Example
$ cd turnpike-example
$ npm install
$ turnpike testdrive

Then just visit http://localhost:1337

Contributing

Contributions are always welcome. The most useful contribution is simply grabbing the framework, playing with it and giving suggestions for what it needs to be complete. Aside from that, documentation and tests are probably the biggest needs. Once the framework is fully instrumented with tests and code coverage detection, I will mark that as the 1.0.0 release.