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

serverus

v0.5.3

Published

Git branch server

Downloads

5

Readme

Serverus

Serverus is a multi-process server for your git repository.

First you need to initialise serverus:

serverus init path://to/myrepo.git

A directory called myrepo.serverus will be created under the current directory - inside is a serverus.json file for your build/deploy settings, and a _repo directory containing a git checkout of your code. It might take a few minutes to run this step, as serverus has to do a full git clone of your repository.

You probably want to update your settings at this point - edit serverus.json:

{
    // Command to run before the main script, this will be run in the root directory of your code.
    // This directory will be one level down from your serverus directory, so you can put shared scripts alongside serverus.json and run them with "../"
    "beforeExec": "command",
    // Args to pass to the beforeExec script
    "beforeExecArgs": [],
    // Executable to run - this should be in your system PATH and will be run in the root directory of your code.
    "exec": "node",
    // Arguments to run the executable with
    // the string "$PORT" is special and will be replaced with the port that serverus wants this instance to run on
    "args": ["server.js", "--port=$PORT"],
    // An array of files you don't want to be deployed - serverus will also respect your .gitignore file
    "excludeFromDeploy": [],
    // Branches to run on startup (you can run others on demand)
    "branches": ["master"],
    // Config overrides for various branches
    "master": {
        "args": ["server.js", "--port=80"]
    }
}

When you're ready to serve your app, use:

serverus run

Visit http://localhost:8123/ to see your branches and that's it!

Additional config

You can use the --help flag to get commandline options for serverus run:

Usage:
  run [OPTIONS] [ARGS]

Options:
  -p, --port [NUMBER]    Port for serverus to listen on (Default is 8123)
  -s, --startingPort [NUMBER]Port to start branch servers listening on (Default is 8124, or port+1)
  -r, --root [STRING]    Root URL of server instances, affects the URL linked
                         to from the serverus server  (Default is /)
  -d, --domain [STRING]  The domain name to serve branches up as subdomains of  (Default is localhost)
      --force BOOL       Force run, remove __serverus.lock file from
                         checkout if necessary
  -h, --help             Display help and usage details

You can also specify the majority of these options in serverus.json, using the full name (eg port not p).