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

pushhub

v0.3.5

Published

A github inspired interface to browse your Git repositories, built on top of expressjs and pushover

Downloads

24

Readme

PushHub

A github inspired interface to browse your Git repositories, built on top of Express and Pushover.

Installation

npm install pushhub

or

git clone http://github.com/shinuza/pushhub.git
cd pushhub
npm link

Features

  • Github like presentation of your repositories
  • Simple and quick set-up
  • Automatic remote folder creation
  • Command-line setup
  • Javascript API
  • Git http interface

Requirements

  • Git 1.7.x
  • Node.js

Usage

Pushhub is a pluggable Express app, therefore the set-up is very flexible

A) CLI: using the built-in binary

Pushhub comes with a binary, probably the simplest way to serve your Git repositories To get the pushhub command, make sure to install with the -g flag:

npm install pushhub -g

And then

pushhub --port 3000 --host localhost --directory ~/repos

point your browser to http://localhost:3000/ to see your repositories.

Note: PushHub is compatible with forever

B) JS API:

First run

npm install pushhub

Then in app.js

var pushhub = require('pushhub');
pushhub.set('git root', __dirname); // You will find a list of available settings below
pushhub.listen(3000);

And then

node app.js

Note: PushHub is compatible with up

C) JS API: With an existing Express app

You can also use PushHub in an existing Express app. Let's say you already have a website at http://localhost and blog at http://localhost/blog/, you can mount PushHub to http:/localhost/git by doing the following.

In app.js

var express = require('express');
var pushhub = require('pushhub');
var app = express.createServer();

// ...

app.use('/git', pushhub);
app.listen(3000);

And then

node app.js

Settings

A) CLI

Usage: pushhub [options]

The pushhub command accepts the following options:

  • -p/--port

    • the port to listen on.
    • Defaults to 3000.
  • -h/--host

    • the host to listen on.
    • Defaults to localhost.
  • -d/--directory

    • the directory containing your git repositories.
    • Defaults to cwd. The node process needs read/write access to this directory

B) JS API

PushHub being an Express application, it can be configured with app.set(name[, val])

Here is a list of the relevant options:

  • git root

    • the directory containing your git repositories.
    • Defaults to process.cwd().
  • history by page

    • the number of commits to display on a commit history page
    • Defaults to 10.
  • views

  • The directory where express will look for the views, can be used to custom the templates (no recommended).

  • Defaults to /path/to/node_modules/pushhub. The node process needs read/write access to this directory

Authentication

PushHub doesn't come with built-in authentication. It's otherwise very easy to set-up authentication in front of it. Basic Auth works well with both http and git interfaces.

Known Issues

  • Pushover doesn't emit a create event, I've proposed a patch but in the meantime I use pushover as a dependency

Running the tests

cd /path/to/pushhub
git clone http://github.com/shinuza/pushhub-test test/sandbox/pushhub-test
npm test

Roadmap

  • Readme handling
  • HTTPS
  • Diffs
  • Look'n'feel