There is no example to describe the simplest implementation.
1. Create a node project and provide a get:test
Route, return a JSON string {"success":true}. Run on port 3000, test 127.0.0.1:3000/test
Can the expected value be returned? No, debug; success, next step.
2. Create a node project, add a page html template: Page, and define route/page. /page, through node js to 127.0.0.1:3000/test
Initiate an http:get request, fill the returned results into the render page and return. Run on port 3001 and see if 127.0.0.1:3001/page can display {"success":true}
Consider trying it
Sister blog https://github.com/itorr/imouto
https://github.com/hubwiz/example-node
There is no example to describe the simplest implementation.
1. Create a node project and provide a get:test
Route, return a JSON string {"success":true}. Run on port 3000, test 127.0.0.1:3000/test
Can the expected value be returned? No, debug; success, next step.
2. Create a node project, add a page html template: Page, and define route/page. /page, through node js to 127.0.0.1:3000/test
Initiate an http:get request, fill the returned results into the render page and return. Run on port 3001 and see if 127.0.0.1:3001/page can display {"success":true}