Polling System API created using NodeJS express and mongo
- express: it is managing the frontend of this App
- Node: takes care of all the backend actions taking place.
- MongoDB: Managing all the data of this App.
- NodeJS
- Express
- MongoDB
- Mongoose
- Git
- NodeJS
- Rest API
- Postman
cd Polling System API
npm install
npm start
The Server should now be running at http://localhost:8000/
GET /
For simple welcome messageGET /question/
For getting all existing questionsGET /question/:id
For getting a single questionPOST /question/create
to create a question. Pass json data in body{ "title" : "test123" }
POST /question/:id/option/create
to create options for a question. Pass the question id in url id parameter and JSON data in body{ "options" : ["abc","def"] }
GET /question/:id/delete
to delete a question. Pass the question id in url id parameterGET /option/
For getting all existing optionsGET /option/:id/delete
to delete an option. Pass the option id in url id parameterGET /option/:id/add_vote
to vote for an option.Pass the option id in url id parameter