# formious

> Experimental experience server

Latest version **0.5.2** (published 2024-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install formious
pnpm add formious
yarn add formious
bun add formious
```

Provides the command `formious`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2024-08-05 |
| First published | 2015-04-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 29 |
| Unpacked size | 617.8 KB |
| Known vulnerabilities | 0 (+64 in 8 direct dependencies) |
| Install scripts | no |
| Author | Christopher Brown |
| Maintainers | chbrown |
| Keywords | forms, surveys |

## Links

- npm: https://www.npmjs.com/package/formious
- Repository: https://github.com/chbrown/formious
- Issues: https://github.com/chbrown/formious/issues
- npm.io page: https://npm.io/package/formious

## Dependencies (29)

- [loge](https://npm.io/package/loge.md) 1.0.5
- [send](https://npm.io/package/send.md) 0.16.2
- [turk](https://npm.io/package/turk.md) 0.7.0
- [xlsx](https://npm.io/package/xlsx.md) 0.12.3
- [async](https://npm.io/package/async.md) 2.6.0
- [jszip](https://npm.io/package/jszip.md) ^2.6.1
- [xpath](https://npm.io/package/xpath.md) ^0.0.27
- [lodash](https://npm.io/package/lodash.md) 3.10.0
- [xmldom](https://npm.io/package/xmldom.md) ^0.1.27
- [angular](https://npm.io/package/angular.md) 1.4.3
- [textarea](https://npm.io/package/textarea.md) 0.2.0
- [commander](https://npm.io/package/commander.md) ^12.1.0
- [flow-copy](https://npm.io/package/flow-copy.md) 0.1.2
- [ng-upload](https://npm.io/package/ng-upload.md) 0.1.0
- [ngstorage](https://npm.io/package/ngstorage.md) 0.3.7
- [notify-ui](https://npm.io/package/notify-ui.md) 0.2.0
- [sql-patch](https://npm.io/package/sql-patch.md) 1.1.0
- [sqlcmd-pg](https://npm.io/package/sqlcmd-pg.md) 3.0.1
- [streaming](https://npm.io/package/streaming.md) 1.1.0
- [urlobject](https://npm.io/package/urlobject.md) 0.0.2
- [handlebars](https://npm.io/package/handlebars.md) 4.0.11
- [@chbrown/sv](https://npm.io/package/@chbrown/sv.md) ^0.4.4
- [httprequest](https://npm.io/package/httprequest.md) 0.1.3
- [virtual-dom](https://npm.io/package/virtual-dom.md) 2.1.1
- [regex-router](https://npm.io/package/regex-router.md) 2.0.0
- [cookiemonster](https://npm.io/package/cookiemonster.md) 1.1.0
- [angular-resource](https://npm.io/package/angular-resource.md) 1.4.3
- [angular-ui-router](https://npm.io/package/angular-ui-router.md) 0.2.15
- [checkbox-sequence](https://npm.io/package/checkbox-sequence.md) 0.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.5.2 (latest) — 2024-08-05
- 0.5.0 — 2018-04-17
- 0.4.6 — 2018-04-03
- 0.4.4 — 2018-03-06
- 0.4.3 — 2017-12-22
- 0.4.2 — 2017-12-22
- 0.4.1 — 2017-12-22
- 0.3.3 — 2015-09-04
- 0.3.2 — 2015-08-04
- 0.3.1 — 2015-07-31
- 0.3.0 — 2015-07-30
- 0.2.5 — 2015-07-10
- 0.2.4 — 2015-07-06
- 0.2.3 — 2015-07-06
- 0.2.2 — 2015-06-29
- … 4 more at https://npm.io/package/formious/versions

## README

# formious

[![latest version published to npm](https://badge.fury.io/js/formious.svg)](https://www.npmjs.com/package/formious)

Formious is a [node.js](http://nodejs.org/) 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](https://requester.mturk.com/). 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](http://aws.amazon.com/mturk/).


## 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`](https://github.com/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`](https://registry.hub.docker.com/u/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](https://chbrown.github.io/licenses/MIT/#2011-2015).

---
_Source: https://npm.io/package/formious · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
