Spaces:
Sleeping
Sleeping
const express = require('express'); | |
const app = express(); | |
const port = 3001; | |
app.get('/', (req, res) => { | |
res.send(` | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Cross-Origin Test</title> | |
</head> | |
<body> | |
<h1>Cross-Origin Test Page</h1> | |
<div id="playgo-chat-container"></div> | |
<script src="http://localhost:3000/api/embed"></script> | |
<script> | |
playgo('init', { | |
containerId: 'playgo-chat-container', | |
width: '400px', | |
height: '600px' | |
}); | |
</script> | |
</body> | |
</html> | |
`); | |
}); | |
app.listen(port, () => { | |
console.log(`Test server running at http://localhost:${port}`); | |
}); |