globus/deploy

19 lines
364 B
Plaintext
Raw Permalink Normal View History

2021-07-26 10:54:33 +00:00
#!/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}`)
})