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

server.js 345B

1234567891011121314151617
  1. const express = require('express')
  2. const path = require('path')
  3. const app = express()
  4. const htmlPath = '10000002'
  5. app.use(express.static(path.join(__dirname, htmlPath)))
  6. const local = 'http://192.168.31.101'
  7. const port = 3000
  8. app.listen(port, () => {
  9. console.log('App listening at ' + local + ':' + port)
  10. })
  11. // http://192.168.31.101:3000