简体   繁体   中英

Is there a way to allow user accounts (sign up+register) with just javascript (angular frontend and node,express server code)?

Most of what I've found uses php, or something similar.

I have an Angular frontend, and Node/express server code. No backend yet. I'm not sure how to proceed with user sign-up.

It is very unsafe to to do sign-up and so on without a backend . A backend means a thing running on server rather than client, so what it does is invisible to the users, thus making it safe. Think about how dangerous it will be when your password-checking and so on are all on client and the user can see everything - thus change everything!

However, node.js is already a backend.

For your question, please search nodejs user system then you will find a lot of answers.

Possible answers:

In short, you have two main ways: The first is to use a framework or a library containing that feature, and the second is to build it yourself through a tutorial.

Hope it works!

It looks like you are one step away from a MEAN stack! And yes, as Sylwit pointed out, your node/express server code is your back-end.

I would recommend you take a look into MongoDB as a database to get you started (you will need to store user credentials/registration information somewhere).

MongoDB is a NoSQL style of a database that will allow you to do what you want, assuming you write the registration and login/logout code to link up to the DB. You don't have to use MongoDB, but since you are just getting started this might be easier because the MEAN stack (Mongo, Express, Angular, Node) is a very popular stack right now and there are plenty of resources online (and on Stack Overflow) to get you started.

Check out the following guide for example: http://jasonwatmore.com/post/2015/12/09/mean-stack-user-registration-and-login-example-tutorial

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM