Repository files navigation
stack details
backend requirements
api endpoints
application routing
app design
backend - nodejs / expressjs
Requirements in backend folder
create .env file containing the following values:- PORT, DATABASEURL, JWT_SECRET, JWT_EXPIRY, fILE_SERVER
fILE_SERVER = "your server address"
eg:- localhost:5000
npm install - to download all dependencies the application requires
node index or npm start - to start the server
method
url
functionality
POST
/admin/login
login admin user
POST
/admin/verify-login
verifies whether admin is logged in
POST
/admin/new-blog
create a new blog post
POST
/admin/new-poll
create a new poll
GET
/admin/blogs
get all blog posts (admin)
GET
/admin/polls
get all polls (admin)
GET
/blogs
get all blog posts (user)
GET
/polls
get all polls (user)
GET
/poll/:id
get all sinlge poll
GET
/poll/verify/:id
check vote received from current ip
PATCH
/poll/:id
to cast vote for the poll
PATCH
/poll/:id/comment
to add comment for the single poll
DELETE
/admin/blog/:id
deletes a paricular blog post
DELETE
/admin/poll/:id
deletes a paticular poll
path
functionality
''
redirects to blogs
/blogs
displays all the blogs present with filter functionality
/polls
displays all the polls available
/blog/:id
displays a particular blog post
/polls/:id
displays a paricular poll with ip based vote functionality
/admin
redirects to admin/login page
/admin/login
admins login page
/admin/blogs
displays all the blogs with delete delete functionality
/admin/polls
displays all the polls with delete delete functionality
/admin/new-blog
to create a new blog post
/admin/new-poll
to create a new poll
About
This is a MEAN stack application for blogging & polling
Topics
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.