build debug

This commit is contained in:
2023-10-13 05:51:45 +08:00
parent 2aadae6b85
commit aa0875ae9e
2 changed files with 6 additions and 3 deletions

View File

@ -15,7 +15,7 @@ turnServer.start(() => {
const app = express() const app = express()
const wsInstance = expressWs(app) const wsInstance = expressWs(app)
app.use(express.static('public')) app.use(express.static('dist'))
app.use(express.json()) app.use(express.json())
app.use((req, res, next) => { app.use((req, res, next) => {
if (req.method === 'CONNECT') { if (req.method === 'CONNECT') {
@ -121,7 +121,7 @@ app.ws('/entanglement', (ws, req) => {
// WEBHOOK 处理 GitHub 事件 // WEBHOOK 处理 GitHub 事件
app.post('/webhook', (req, res) => { app.post('/webhook', (req, res) => {
console.log('WEBHOOK:' + new Date().toLocaleString()) console.log('WEBHOOK:' + new Date().toLocaleString())
exec('git pull;npm i') exec('git pull;npm i;npm run build')
return res.json({ success: true }) return res.json({ success: true })
}) })

View File

@ -20,5 +20,8 @@ export default defineConfig({
}, },
plugins: [ plugins: [
WindiCSS(), WindiCSS(),
] ],
build: {
target: "esnext"
}
}) })