Browse Source

hotfix for heroku, execute run dev instead of production server

pull/146/head
Davide 7 years ago
parent
commit
62323bbc23
3 changed files with 2 additions and 14 deletions
  1. +1
    -1
      package.json
  2. +0
    -12
      server.js
  3. +1
    -1
      webpack/devServer.js

+ 1
- 1
package.json View File

@ -4,7 +4,7 @@
"private": true,
"description": "HTML Admin Template",
"scripts": {
"start": "npm run build && node server.js",
"start": "webpack-dashboard -t 'Project' -- webpack-dev-server",
"dev": "webpack-dashboard -t 'Project' -- webpack-dev-server",
"clean": "shx rm -rf ./build",
"build": "npm run clean && cross-env NODE_ENV=\"production\" webpack",


+ 0
- 12
server.js View File

@ -1,12 +0,0 @@
const express = require('express');
const app = express();
app.use(express.static('public'));
// start the server with the build folder.
app.use('/', express.static(__dirname + '/build'));
const server = app.listen(process.env.PORT || 3000, function () {
console.log('Server started at http://localhost:%s', server.address().port);
});

+ 1
- 1
webpack/devServer.js View File

@ -17,7 +17,7 @@ const
const devServer = {
contentBase : manifest.IS_PRODUCTION ? manifest.paths.build : manifest.paths.src,
historyApiFallback : true,
port : manifest.IS_PRODUCTION ? 3001 : 3000,
port : manifest.IS_PRODUCTION ? process.env.PORT || 3001 : process.env.PORT || 3000,
compress : manifest.IS_PRODUCTION,
inline : !manifest.IS_PRODUCTION,
watchContentBase: true,


Loading…
Cancel
Save