npm install
nodemon
http://localhost:3000/login --- POST
http://localhost:3000/login
{"username":"zain","password":"password"}
verify user from database.
name of the database is toddle. Created using MySql.
database configuration file is located in util folder - database.js
Login Detail :
Id:Password
zain:password
user1:password
user2:password
http://localhost:3000/user -- POST
this page can be access by 4 option
1. create survey(By current user)
2. view(of any user)
3.take(by current user)
4.result
1 create survey
{
"choice" : [
{
"no":1,
"question":"one"
},
{
"no":2,
"question":"one two"
}
]
}
2 View created Survey
{
"choice": [
{
"no": 2,
"username": "zain"
}
]
}
3 Take Survey
{
"choice": [
{
"no": 3,
"surveyId": 1,
"answer" : 0
},
{
"no": 3,
"surveyId": 2,
"answer" : 1
}
]
}
4 survey result
{
"choice": [
{
"no": 4
}
]
}
{"imgURL" : "http://www.google.com/images/srpr/logo11w.png"}
image are store into image folder with current-time_50x50.png format.
i am facing some issues with SqlLite :`( so i decided to use MySql instead : ) database file is in util folder in .sql and .json format.