修改README.md
This commit is contained in:
18
deploy
Normal file
18
deploy
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/env node
|
||||
|
||||
const express = require('express')
|
||||
const path = require('path')
|
||||
|
||||
const app = express()
|
||||
|
||||
app.use(express.static(path.resolve(__dirname, 'dist')))
|
||||
|
||||
app.use('/*', (req, res) => {
|
||||
res.sendFile(path.resolve(__dirname, 'dist', 'index.html'))
|
||||
})
|
||||
|
||||
const port = process.env.PORT || 80
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`http://0.0.0.0:${port}`)
|
||||
})
|
Reference in New Issue
Block a user