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

formious

v0.5.2

Published

Experimental experience server

Downloads

8

Readme

formious

latest version published to npm

Formious is a node.js experiment server. It fills a niche somewhere above Google Forms, SurveyMonkey, or Qualtrics, but below a full-fledged web application. It provides an opinionated way of presenting stimuli to a participant, which requires more technical knowledge than the previously mentioned form services, but allows much greater flexibility in the construction and presentation of the form questions.

In particular, it was originally built to interface with Amazon Mechanical Turk. In addition to serving as the backend for External Questions, it also provides an alternate interface to parts of the AWS MT interface available via the API.

Installation

npm install -g formious
formious

Build steps

The scripts field in package.json defines the build steps.

  • The prepare stage runs the TypeScript compiler, because the compiled output is not kept under version control.
  • The prepack-* stages are for static client-side requirements, like .css and bundle.js.
  • The prepack stage runs the various prepack-* stages.

Deployment

We'll deploy to a Digital Ocean droplet.

DIGITALOCEAN_ACCESS_TOKEN=6c4a0280d36dc219n0t4ctua11ymydigital0ceant0k3n9186729fe910b157bb
docker-machine create -d digitalocean --digitalocean-region nyc3 --digitalocean-size 1gb formious

The formious application requires a PostgreSQL database.

docker run -d --name db -p 127.0.0.1:15432:5432 \
  -v /var/docker/db:/var/lib/postgresql/data postgres:9.4
  • the -v argument stores the data on the host machine so that we don't lose all our data if we accidentally remove or update the postgres container.
  • the -p argument opens the database for access directly from the host machine, which makes backing up the data easier. E.g., if on Ubuntu, run apt-get install postgresql-client to get the appropriate tools, then run pg_dump -h localhost -p 15432 -U postgres formious to dump the database to stdout.

We'll use the handy jwilder/nginx-proxy container to back-proxy HTTP(S) requests to the formious app.

docker run -d -v /var/run/docker.sock:/tmp/docker.sock \
   -p 80:80 -p 443:443 --name nginx jwilder/nginx-proxy

This repo is automatically built as a docker container on Docker Hub at chbrown/formious.

docker run -d -e VIRTUAL_HOST=formious.com --link db:db \
  --restart always --name app chbrown/formious
  • The -e VIRTUAL_HOST=formious.com argument tells nginx-proxy to forward formious.com requests to this container. You would use a different hostname here, since I own formious.com.
  • The --link db:db exposes to the database container, named db, to the formious application, under the alias db.

To update, pull the latest image, remove the running container, then enter the same docker run command as above:

docker pull chbrown/formious && \
  docker rm -f app && \
  docker run -d -e VIRTUAL_HOST=formious.com --link db:db \
    --restart always --name app chbrown/formious

License

Copyright 2011–2015 Christopher Brown. MIT Licensed.