forked from desktop/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug
More file actions
27 lines (21 loc) · 604 Bytes
/
debug
File metadata and controls
27 lines (21 loc) · 604 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env node
'use strict'
const express = require('express')
const webpack = require('webpack')
const config = require('../app/webpack.development')
const server = express()
const compiler = webpack(config)
const port = process.env.PORT || 3000
server.use(require('webpack-dev-middleware')(compiler, {
publicPath: config.output.publicPath,
noInfo: true
}))
server.use(require('webpack-hot-middleware')(compiler))
server.listen(port, 'localhost', err => {
if (err) {
console.log(err)
process.exit(1)
return
}
console.log(`Server running at http://localhost:${port}`)
})