Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

biojs/registry-workmen

Repository files navigation

registry-workmen

Build Status

The BioJS registry backend.

Workflow

  1. Search for all packages with a special tag on npm ('biojs', bionode') + remove duplicate packages (uniq)
  2. Query npm -> package.json
  3. Run extensions
    3.1) npm: history stats
    3.2) github
    3.2.1) github info
    3.2.2) github stats
    3.2.3) Optional: Query github for snippets (ls "snippets")
  4. Run post processing (e.g. removal of duplicate keywords)
  5. Store the result in a DB

Currently the db is cleaned on every run.

(see workflow.js)

Registry workmen workflow

Use

A working instance can be browsed at workmen.biojs.net. If you want deploy access, ping @greenify - otherwise just send us a pull request here.

Cronjobs

  • check for package version: 60 seconds
  • refresh all packages: 60 minutes

Available views

Registry information

/all: JSON with all biojs packages

/detail/:name: info for only one BioJS packages

/stat: General statistics

Snippet pages

/demo/:name: Listing of all available snippets

/demo/:name/:snippet: Display the :snippet.

Edit in a online JS editor

Will forword you to the specific editors with the snippet.

/jsbin/:name/:snippet

/codepen/:name/:snippet

/plunker/:name/:snippet

Package news

/news/atom: Display the package event stream in the ATOM format

/news/rss: Display the package event stream in the RSS format

/news/json: Display the package event stream in JSON

You can filter with the following parameter

Debug

/logs: Display the latest log outputs

(see server.js)

Dev registry

This branch is synchronized with a dev registry.

-> use it http://dev.workmen.biojs.net

Install

git clone https://github.com/biojs/registry-workmen
cd registry-workmen
npm install

You might need to setup github API credentials (see below).

Run

node server.js

(will be running on Port 3000)

Write an extension

Two requirements

  1. Return a promise
  2. Add your extension to "downloadPkg" in workflow.js

Creds for github

Create your own oAuth token here with "public_repo" access

https://github.com/settings/tokens

a) via creds.json

creds.json (root folder)

{type:"oauth", token:"<token>"}

b) via ENVs

define an enviroment variable

export GITHUB_TOKEN=<token>

more info