123456789101112131415 |
- const express = require('express')
- const history = require('connect-history-api-fallback')
- const app = express()
- const httpPort = 3000
- const middleware = history(
- {
- index: '/index.html'
- }
- )
- app.use(middleware)
- app.use(express.static('dist'))
- app.listen(httpPort, () => {
- console.log('Server listening on: http://localhost:%s', httpPort)
- })
|