So I am working on a blog using node express and mongodb and was wondering what is the best way to allow only myself to post on the website.
What is the best way to implement post functionality in a website so that only the owner can post stuff?
Not sure if it’s the
"best", but you could have yourself just type in a password with the post and check if it’s correct before it actually posts
But is there a way to restrict access to that POST route so that only I could use it as it is personal blog
Sure, but you will still need some way to authenticate that it is you trying to access that POST route. You could make it so if a visitor is not authenticated for that route, they receive some type of warning or you just route them somewhere else on your site.