Skip to content

Simple project for creating surveys for web sites. Intended for use with Nodeschool Bainbridge.

License

Notifications You must be signed in to change notification settings

IslandJS/survey-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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\" : \"[email protected]\"',
  \"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\" : \"[email protected]\",
      \"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.

About

Simple project for creating surveys for web sites. Intended for use with Nodeschool Bainbridge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published