简体   繁体   English

服务器端JavaScript中的帐户(node.js)

[英]Accounts in serverside JavaScript (node.js)

I'm making an online game and I was wondering - how can users create accounts? 我正在制作一款在线游戏,我想知道 - 用户如何创建帐户? Do I need a database, and if yes, which one? 我需要一个数据库,如果是,那么哪个? Also how do I get information from the users? 另外我如何从用户那里获取信息? I believe by using html tag, but how exactly? 我相信通过使用html标签,但究竟如何? I'm not using PHP for the serverside, but node.js. 我没有在服务器端使用PHP,而是使用node.js.

There are so many answers to this question it's tough to begin at one place. 这个问题有很多答案,很难从一个地方开始。

I'll just suggest some technologies because that seems to be what you're looking for. 我只是建议一些技术,因为这似乎是你正在寻找的。 Ultimately I recommend you research this area and make up your own mind on what you'd like to use. 最后,我建议您研究这个领域,并根据自己想要使用的内容进行自己的思考。

You can use a database to store the user information. 您可以使用数据库来存储用户信息。 NoSQL is popular nowadays so I'll go for a MongoDB solution http://www.mongodb.org/ NoSQL现在很受欢迎,所以我会选择MongoDB解决方案http://www.mongodb.org/

You don't exactly need to use HTML tags as there are template solutions written for node.js. 您不需要使用HTML标记,因为有为node.js编写的模板解决方案。 I recommend jade https://github.com/visionmedia/jade 我推荐jade https://github.com/visionmedia/jade

There are frameworks and middleware created to make all of this easier. 有一些框架和中间件可以让所有这些变得更容易。 Check it out here https://github.com/joyent/node/wiki/modules 在这里查看https://github.com/joyent/node/wiki/modules

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

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