playgo_next / test-server.js
ChenyuRabbitLove's picture
feat: add embeddedable chat component
c4412d0
raw
history blame
698 Bytes
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}`);
});