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

team-api-server

v0.1.6

Published

Imports and publishes updates to Team API data

Downloads

3

Readme

team-api-server

Node.js server that imports and publishes updates to Team API data.

Generate and configure team-api-config.json

Run team-api print-template > path/to/team-api-config.json to generate a team-api-config.json file. Edit this file to support your installation.

The template is a copy of the team-api-config.json from this repository, which is based on the actual configuration for the 18F Team API server, and illustrates each of the following settings:

  • branch: the repository branch from which to extract update information
  • buildPort: the port on which the server will listen for push events to the team-api.18f.gov repo
  • updatePort: the port on which the server will listen for updates to .about.yml files from other 18F repos
  • git: path to git on the host machine
  • ruby: path to ruby on the host machine
  • workingDir: path to the 18F/team-api.18f.gov repository clone on the host machine
  • updateScript: path to the Ruby script used to process .about.yml file updates

Installing the team-api server

Install the following if they are not yet present on your system:

  • Node.js version 0.12.7 or higher; check with node -v
  • Ruby version 2.2.3 or higher; check with ruby -v
  • Git version 1.9.1 or higher; check with git --version

For Ruby, we strongly recommend using a version manager such as rbenv or rvm, though this is not required.

rsync should already be installed on most UNIX-like systems, but the rsyncOpts configuration option may require adjustment, particularly on OS X. You may wish to experiment with rsync manually to determine which options suit you best.

With the correct Node.js, Ruby, and Git versions in place, run the following:

$ gem install jekyll bundler
$ npm install -g team-api-server forever

Finally, as the user on the host that will run the server, generate an SSH key to add to your GitHub account. A new key can be generated by another team member should you leave the organization.

Run the team-api server

After that, run the following to launch the server via Forever, where /path/to/ and /usr/local/bin/ are replaced with the appropriate absolute paths:

$ forever start -l /path/to/team-api.log -a /usr/local/bin/team-api /path/to/team-api-config.json

You can find the absolute path to team-api by running which team-api.

Contributing

  1. Fork the repo (or just clone it if you're an 18F team member)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make your changes and test them via npm test or gulp test
  4. Lint your changes with gulp lint
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create a new Pull Request

Feel free to file an issue or to ping @mbland with any questions you may have, especially if the current documentation should've addressed your needs, but didn't.

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.