Skip to content

Commit

Permalink
Removing reload from prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Gore committed Dec 5, 2016
1 parent 716290d commit 7826029
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env_sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
IMGUR_CLIENT_ID=x
PORT=3000
NODE_ENV=development
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### Vue.js Poster Store

#### Demo

See the completed project here: [https://vuejs-poster-shop.herokuapp.com/](https://vuejs-poster-shop.herokuapp.com/)

#### Pre-installation

1. Ensure that npm is installed globally
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ var express = require('express');
var app = express();
var path = require('path');
var server = require('http').createServer(app);
var reload = require('reload');
var axios = require('axios');
var querystring = require('querystring');

Expand Down Expand Up @@ -35,7 +34,9 @@ app.get('/search/:query', function(req, res) {
app.use('/node_modules', express.static(path.join(__dirname, 'node_modules')));
app.use('/public', express.static(path.join(__dirname, 'public')));

reload(server, app);
if (process.env.NODE_ENV !== 'production') {
require('reload')(server, app);
}

server.listen(process.env.PORT, function () {
console.log('Listening on port '.concat(process.env.PORT))
Expand Down

0 comments on commit 7826029

Please sign in to comment.