You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
364 B
JavaScript

#!/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}`)
})