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

hostr

v3.0.4444

Published

A simple web server for the current working directory. Used for hello world style web sites hosting only files in current directory structure. Watches files and integrates with LiveReload.

Downloads

1,007

Readme

hostr

Join the chat at https://gitter.im/henrytseng/hostr

Build Status

Great for testing quick HTML code.

A simple web server for the current working directory. Used for hello world style web sites hosting only files in current directory structure.

Serves up files and caches files for quick responses.

Watches directory structure and refreshes on file changes through LiveReload.

Installation

Run the following

npm install hostr -g

Use

Run the following command to host the current working directory

cd project/my_development_project
hostr

A simple web server will be hosted at

http://localhost:3000

To host at a different port, set the PORT environment variable (For example, host on port 8080).

hostr --port 8080

Watch Changes

To disable watching (debugging only)

hostr --watch off

To ignore files create a .hostrignore file in the current working directory using minimatch notation

file
directory/all/files/**/*
directory/*

For more information check out minimatch

LiveReload

LiveReload is used for development. hostr monitors your files. When a file save occurs LiveReload communicates with your site and pushes a refresh to your browser (e.g. - iPhone/Android/Blackberry, Desktop-Chrome/IE/Safari) so that your changes are immediately visible.

Communication between hostr and LiveReload occur through WebSockets. You must use a WebSocket enabled browser.

To use LiveReload (additional instructions):

Add the following code to your HTML:

<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>

Then run hostr and when file changes are detected your browser will refresh.

cd project/my_development_project
hostr

LiveReload port can be changed (default: 35729), to use port 32021

hostr --livereload-port 32021

To disable LiveReload

hostr --livereload off

Cache

To change cache expiration time (seconds, default: 60)

host --cache-expiration 5

Quiet Mode

To run quietly use

hostr --quiet

And output will be suppressed

Contribute

If you've got ideas on how to make hostr better create an issue and mark an enhancement in Github.

License

Copyright (c) 2014 Henry Tseng

Released under the MIT license. See LICENSE for details.