1

I've started to learn backend development, focus on http server mainly. But I'm really new to this, so it's a little out of focus for me, and I could really use some advice.

For example, if I try to implement something like this

  1. A http server runs on linux/Windows
  2. A private REST API which allows to POST a json object, plus a login mechanism, so only authorised user can do the POST.
  3. Implement a public REST API which allows to GET the same json object

And here is my question: Can I use Nodejs and express to implement all these? I also know little about them. Do I need a Database to implement the login mechanism? Is there any similar tutorial or best practise I can study from?

Regards

Ben

3 Answers 3

2
  • Yes, you can use NodeJS for this.

  • Not necessarily. You just need a way to authorise users. Most common is to use a database to store a username/email and password, but you could also look into using a third-party service for this, for example facebook or google

  • Yes, there is a lot of tutorials and especially best practices on this subject. Your question is too broad to link relevant material, but some terms you can use to google this yourself is "nodejs rest api" "rest api best practice". Passport.js is a good place to start for getting into authorising users. For REST-api, the closer you get to normal web standards, the better - Especially if other people than you are going to consume the api.

Sign up to request clarification or add additional context in comments.

Comments

1

Node.js is a run-time environment/framework/platform for developing non-blocking I/O server side processes, services, or RESTful API's. You can start by learning what Node.js can do before you go on developing a login story and, and a restful endpoint here Next if you intend to go all the way and learn full-stack web development start from here, This will guide you to learn Node.js , Express.js, Mongodb, and finally Angular.js for front-end. Good luck and happy coding

Comments

0

Yes, you can use Node.js and Express.js. I recomend you to read some articles about REST and TDD from this amazing blog, especialy this or this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.