javascript - I work as a web front-end, and my company recently had a project about data statistics!
某草草
某草草 2017-05-16 13:34:02
0
5
498

Since the official server has integrated more than a dozen projects, my supervisor told me that this project may require the front-end to build its own server, and the back-end is responsible for the interface. So I thought of using nodejs as the server, but I would only start the nodejs service. As for how to use nodejs to cooperate with the backend interface, I have never tried it. I would like to ask you for advice!

某草草
某草草

reply all(5)
我想大声告诉你

I just made one like this. . I didn’t know anything about node at the time
I used express. Creating a service is very simple. After init, you just need to change it slightly according to your business. It’s nothing more than router->controller->views, and the page is written in the router. For routing and controller, just go to the original backend through node to adjust the interface, and then render the data into views. To adjust the interface, I use node-rest-client. There are many similar ones. Just pick the one that suits your eyes. .
I divide it into interface calls in the controller and interface calls in the front-end page. You can encapsulate them yourself

習慣沉默

A good way to learn is to go to github and look for existing similar projects, see how others do it, and then follow suit.

淡淡烟草味

You can take a look at https://github.com/cristismf/...
02-db-demo should be helpful to you

曾经蜡笔没有小新

/a/11...
You can take a look at this

Ty80

First of all, you need to know what database you want to use, and then learn to operate the database corresponding to nodejs. The backend interface will be gradually solved, and the front end will not be a problem for you

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!