Skip to content

Commit

Permalink
Add express server
Browse files Browse the repository at this point in the history
  • Loading branch information
malkabaltazar committed Aug 2, 2020
1 parent 2d77e40 commit d408b31
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified dist/.DS_Store
Binary file not shown.
File renamed without changes.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack-dev-server --open --config webpack.config.js --content-base dist",
"start": "node server.js",
"dev-server": "webpack-dev-server --open --config webpack.config.js --content-base dist",
"build": "webpack --config webpack.config.js"
},
"author": "",
Expand All @@ -15,6 +16,7 @@
"webpack-cli": "^3.1.2"
},
"dependencies": {
"express": "^4.17.1",
"webpack-dev-server": "^3.11.0"
}
}
6 changes: 6 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const express = require('express')
const app = express();
app.use(express.static("dist"))

const PORT = process.env.PORT || 3000;
app.listen(PORT, ()=>console.log(`Listening at port ${PORT}`))

0 comments on commit d408b31

Please sign in to comment.