mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
20 lines
525 B
JavaScript
20 lines
525 B
JavaScript
const path = require('path')
|
|
const express = require('express')
|
|
const app = express()
|
|
const port = 3001
|
|
|
|
app.use('/static', express.static(__dirname + '/../../dist'))
|
|
|
|
app.get('/segment.html', function (req, res) {
|
|
res.sendFile(__dirname + '/segment.html')
|
|
})
|
|
|
|
app.get('/static/recorder.js', function (req, res) {
|
|
let filePath = path.join(__dirname, '/../../node_modules/rrweb/dist/rrweb.js')
|
|
res.sendFile(filePath)
|
|
})
|
|
|
|
app.listen(port, () => {
|
|
console.log(`Example Segment app listening on port ${port}`)
|
|
})
|