简体   繁体   English

有没有办法允许用户帐户(注册+注册)只需javascript(角度前端和节点,快递服务器代码)?

[英]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. 我发现的大部分内容都使用了php或类似的东西。

I have an Angular frontend, and Node/express server code. 我有一个Angular前端和Node / express服务器代码。 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 . 在没有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. 但是, node.js已经是后端。

For your question, please search nodejs user system then you will find a lot of answers. 对于您的问题,请搜索nodejs user system然后您会找到很多答案。

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! 看起来你离MEAN堆栈只有一步之遥! And yes, as Sylwit pointed out, your node/express server code is your back-end. 是的,正如Sylwit指出的那样,您的节点/快速服务器代码您的后端。

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作为数据库来启动你(你需要在某处存储用户凭据/注册信息)。

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. MongoDB是一种NoSQL风格的数据库,它允许你做你想做的事情,假设你编写了注册和登录/注销代码来链接到数据库。 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. 您不必使用MongoDB,但由于您刚刚开始这可能会更容易,因为MEAN堆栈(Mongo,Express,Angular,Node)现在是一个非常受欢迎的堆栈,并且有大量的在线资源(以及Stack Overflow)让你入门。

Check out the following guide for example: http://jasonwatmore.com/post/2015/12/09/mean-stack-user-registration-and-login-example-tutorial 查看以下指南,例如: http//jasonwatmore.com/post/2015/12/09/mean-stack-user-registration-and-login-example-tutorial

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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