hyperboria/rules/nodejs/webpack.server.js
the-superpirate 8472f27ec5 No description
GitOrigin-RevId: ddf02e70d2827c048db49b687ebbcdcc67807ca6
2021-01-04 18:12:22 +03:00

12 lines
376 B
JavaScript

const config = require('./{config_path}')
const express = require('express')
const app = express()
app.use(express.static('{static_path}'))
app.get('/', (req, res) => {
res.sendFile('./index.html', { root: '{static_path}' })
})
app.listen(config.application.port, config.application.host, () => {
console.log(`Server is listening on port: ${config.application.port}`)
})