mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-20 20:01:31 +00:00
updated run script for frontend
This commit is contained in:
parent
71c3d3c37f
commit
2347deb317
@ -1,3 +1,4 @@
|
||||
/*
|
||||
// Imports
|
||||
const express = require('express')
|
||||
const serveStatic = require('serve-static')
|
||||
@ -13,3 +14,22 @@ app.listen(port)
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`http://frontend:${port} server started.`)
|
||||
*/
|
||||
|
||||
const express = require('express')
|
||||
const path = require('path')
|
||||
|
||||
const hostname = '127.0.0.1'
|
||||
const port = process.env.PORT || 3000
|
||||
|
||||
const app = express()
|
||||
app.use(express.static(path.join(__dirname, '../dist')))
|
||||
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(__dirname, '../dist/index.html')
|
||||
})
|
||||
|
||||
app.listen(port, hostname, () => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Listening at http://%s:%s/', hostname, port)
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user