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 🙏

© 2024 – Pkg Stats / Ryan Hefner

servit

v0.3.1

Published

The stupid development server. Serves CoffeeScript, EJS, and Stylus like a champ. Reloads browser on source-file change.

Downloads

4

Readme

servit

The stupid development server. Fork of workit

  • Reloads browser on source-file change.
  • Serves CoffeeScript, EJS, and Stylus like a champ.
  • Compiled output sent directly to browser for a pristine working directory.
  • No caching so you're guaranteed to get the latest changes.

Built with Connect, Socket.io, Commander.js, and hound. Inspired by visionmedia's serve and nodejitsu's http-server.

Installation

Via npm:

$ npm install -g servit

Usage


	Usage: servit [options] [dir]

	Options:
		-h, --help				output usage information
		-V, --version			output the version number
		-a, --address <string>	set hostname [127.0.0.1]
		-f, --format <string>	connect logger format [dev]
		-p, --port <number>		set port number [3000]

	Examples:

		Serve the current directory

			$ cd /var/www
			$ servit
			Serving /var/www at http://localhost:3000/

		Serve a specific directory

			$ servit /var/www/foo
			Serving /var/www/foo at http://localhost:3000/

		Serve a specific directory with options

			$ servit -a 192.168.0.1 -p 8080 /var/www/foo
			Serving /var/www/foo at http://192.168.0.1:8080/

Features

Preprocessing

servit transparently compiles .coffee, .ejs, and .styl files and sends the output directly to the browser. No rendered files are written to disk, so your working directory is left in a pristine state (I'm looking at you connect-assets).

File extensions are taken literally. If you request .ejs, you'll get EJS:


	$ curl http://localhost:3000/foo.ejs
	<!DOCTYPE html><title>Hello world</title><link rel="stylesheet" href="foo.css"><script src="/connect-reload.js"></script><script src="foo.js"></script>
	<% include someAnotherTemplate %>

If you want the slightly-more-useful compiled html, request .htm or .html instead:


	$ curl http://localhost:3000/foo.html
	<!DOCTYPE html><title>Hello world</title><link rel="stylesheet" href="foo.css"><script src="/connect-reload.js"></script><script src="foo.js"></script>

Same goes for .coffee vs .js and .styl vs .css.

Auto-reload

To enable automatic reloading of a page when a file in your project is created or changed, simply include the virtual /connect-reload.js in your markup:

	<!-- HTML -->
	<script src="/connect-reload.js"></script>

License

(The MIT License)

Copyright (c) Patrik Votoček <[email protected]> Copyright (c) Shannon Moeller <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.