node.js - nodejs 技术架构选择
迷茫
迷茫 2017-04-17 13:33:23
0
3
471

如题。
如果选择使用nodejs作为网站后端,需要哪些架构配合?
网站要求:

  1. 网页端,微信端,移动端都要支持

  2. 数据存储打算使用MySQL,redis,数据量目前来说前期百万级,可能存在井喷式数据增长

  3. websocket
    目前我只知道可能会用到nodejs,express,react,react-native。

目前有几点比较困惑:

  1. 选用前端模板渲染还是后端渲染

  2. ORM

  3. OAuth

  4. CSS,UI方面有木有推荐的框架比如bootstrap之类的

  5. 如果使用前端模板的方式,SEO?

我也知道这个问题比较大,需要跟业务相关联,我只是想知道目前大概的架构框子而已,学习。或者说目前比较流行的模式是怎么样的?

先谢谢打字回答了。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(3)
Ty80

It seems that the great masters are taking a rest. I'll just sort it out myself.

Probably the shelf will use nodejs as the back-end server, and other needs will revolve around nodejs. express+mongoose should probably be able to implement an MVC with a similar structure, and the database will use mongoDB instead (follow closely trend..). OAuth uses the everyAuth middleware (passport is also very convenient), and the built-in ones are some popular foreign websites. If you want to access WeChat or something, you probably have to write some code yourself. Visual inspection is not very difficult. expressImplementationREST API is so eazy by visual inspection, WebSocket nodejs also supports it, surprisingly simple. As for redis, the client has it, mongoose has hooks, I think it also has the cooperation between database and redis A very convenient implementation method. Taking into account the evil Baidu, express's default jade template is used. What has not been finalized yet is the front end. There are too many choices, jQuery, react, angular, backbone, vue. I want to try it on the mobile version react-native. Apps are mostly displayed, so I think this is easier. After all, I’m not familiar with iOS.

After I clarified these relationships, I discovered that there was already something called mean that did something similar. You can go take a look, but I don’t really like this kind of architecture that integrates too much.

刘奇

RecommendedmeteorAdd react to learn more

黄舟

I have the same difficulty in choosing as you, and I hope experienced drivers can help answer it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template