0元购项目,Web调用原生的demo

server.js 345B

    const express = require('express') const path = require('path') const app = express() const htmlPath = '10000002' app.use(express.static(path.join(__dirname, htmlPath))) const local = 'http://192.168.31.101' const port = 3000 app.listen(port, () => { console.log('App listening at ' + local + ':' + port) }) // http://192.168.31.101:3000