survey-maker
Rest based server for making and conducting simple surveys.
Last updated 5 years ago by awaterma .
GPL3 · Bugs · Original npm · Tarball · package.json
$ cnpm install survey-maker 
SYNC missed versions from official npm registry.

survey-maker

Host your own simple surveys!

Configure this basic survey server to listen on the port of your liking on the command line:

$ survey-maker 2015

Once the server is listening, post to the "survey" URL to create a new survey:

$ curl --data "{
  \"Name\" : \"Test\",
  \"Email\" : \"test@email.test\"',
  \"Volunteering\" : \"[true,false]\",
  \"Interests\" : \"Helping others.\",
  \"Program\" : \"[true,false]\",
  \"Years\" : \"10\",
  \"Languages\" : \"[\"blockly\",\"java\",\"javascript\",\"c\",\"cpp\"]\"\
}" http://localhost:3000/survey/SimpleTest

You can then refer to this survey in subsequent posts, with the server handling verification of the submitted fields for you:

$ curl --data "{
      \"Survey\" : \"Test\",
      \"Name\" : \"Jill Tester\",
      \"Email\" : \"jill@example.test\",
      \"Volunteering\" : \"true\"
      \"Interests\" : \"Learning\",
      \"Program\" : \"false\",
      \"Years\" : \"0\",
      \"Languages\" : \"[]\"  
  }" http://locahost:3000/survey/SimpleTest/example

Values are checked for type equivalency and arrays checked to see if they also contain equivalent types.

Results are available as well:

$ curl http://localhost:3000/results/SimpleTest

Hope you have fun creating surveys!

Note: This program uses a very light-weight serialization layer; for heavy use you will probably want to swap out the data-store for something more robust.

Current Tags

  • 1.0.3                                ...           latest (5 years ago)

4 Versions

  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |