Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8393483
server.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
571 B
Subscribers
None
server.js
View Options
const
webpackDevServer
=
require
(
'webpack-dev-server'
);
const
webpack
=
require
(
'webpack'
);
const
config
=
require
(
'./webpack.config.js'
);
const
options
=
{
publicPath
:
config
.
output
.
publicPath
,
port
:
3000
,
hot
:
true
,
inline
:
true
,
historyApiFallback
:
true
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
},
};
webpackDevServer
.
addDevServerEntrypoints
(
config
,
options
);
const
compiler
=
webpack
(
config
);
const
server
=
new
webpackDevServer
(
compiler
,
options
);
server
.
listen
(
3000
,
'localhost'
,
()
=>
{
console
.
log
(
'dev server listening on port 3000'
);
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 4, 7:14 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3242430
Attached To
rPDWL django-webpack-loader
Event Timeline
Log In to Comment