Operation steps:

  1. To install node, run the following command
express myservice
cd myservice
npm install 
npm start
Copy the code

2. After performing the above operations, you will get one:

3. The default port is 3000

4. Write an interface

Next up is the app.js file

The cross-domain solution is included above: execute NPM install cors and add the following code snippet

var cors = require('cors');
app.use(cors());
Copy the code

The database operation is not involved at the moment.