Hello /r/nodeSo until now, I've only developed fairly simple web apps with Node.JS -- alas, I'm a rookie. However, I've recently played with the thought of venturing further in, and trying to create a bigger project. There are just a few things I am yet unsure of, and I haven't been able to find answers.These are some of my concerns:Say I want to have comments in my web app with the option of down- and upvoting these with the press of a button -- how would I go about storing a comment vote in my DB? Most importantly, how do I tell my server to do this, when most things in Node are based on GETs and POSTs?I'm a bit confused in terms of the REST API -- I'd like to be able to query my DB, with GET exclusively, in the frontend, so I can do stuff like paging. With this I mean getting more elements, when the user wants to view the next page of e.g. a message board. DB in frontend is a no-go I know, but how do I this the safe and proper way?If I'd like an endpoint only meant for "admins" of the site, where you can issue bans to specific accounts, how do I "hide" this endpoint from regular users? This endpoint would also have a POST for creating the ban itself.Thanks in advance for any help. I realize these questions might be pretty big but oh well.
Submitted May 03, 2017 at 03:42PM by tobyass
No comments:
Post a Comment