mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-25 02:00:06 +00:00
22 lines
637 B
JavaScript
22 lines
637 B
JavaScript
var webpack = require('webpack')
|
|
var WebpackDevServer = require('webpack-dev-server')
|
|
var config = require('./webpack.config.dev')
|
|
|
|
new WebpackDevServer(webpack(config), {
|
|
publicPath: config.output.publicPath,
|
|
hot: true,
|
|
contentBase: '../assets',
|
|
historyApiFallback: true,
|
|
headers: {
|
|
"Access-Control-Allow-Origin": "*",
|
|
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
|
|
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
|
|
}
|
|
}).listen(3000, '0.0.0.0', function (err, result) {
|
|
if (err) {
|
|
console.log(err)
|
|
}
|
|
|
|
console.log('Listening at 0.0.0.0:3000')
|
|
})
|