Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit 1966ed3

Browse files
committed
server.js ES2015 adjustments.
Replace some ES5 syntax with ES2015 equivalents.
1 parent 68c247e commit 1966ed3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/simple/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ const devConfig = {
1616

1717
console.log( 'Starting server.' );
1818

19-
var compiler = webpack( config );
19+
const compiler = webpack( config );
2020
app.use( webpackDevMiddleware( compiler, devConfig ) );
2121
app.use( webpackHotMiddleware( compiler ) );
2222

23-
app.get( '/', function( req, res ) {
23+
app.get( '/', ( req, res ) => {
2424
res.sendFile( __dirname + '/index.html' );
2525
} );
2626

27-
app.listen( port, function( error ) {
27+
app.listen( port, ( error ) => {
2828
if ( error ) {
2929
console.error( error );
3030
} else {

0 commit comments

Comments
 (0)