Commit 533125f06eefb0aaf39e44b6e8e006732ca6a287
1 parent
88b8df26
Exists in
master
V. 0.8.5 - Production test.
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
app.js
... | ... | @@ -7,11 +7,11 @@ const cookieSession = require("cookie-session"); |
7 | 7 | var cookieParser = require("cookie-parser"); |
8 | 8 | var bodyParser = require("body-parser"); |
9 | 9 | const keys = require("./config/keys"); |
10 | - | |
10 | +var util = require('util'); | |
11 | 11 | var index = require("./routes/index"); |
12 | 12 | |
13 | 13 | var app = express(); |
14 | -app.use("/", index); | |
14 | + | |
15 | 15 | /** |
16 | 16 | * Production version verification. It needs to build for React client. |
17 | 17 | */ |
... | ... | @@ -30,7 +30,7 @@ if (process.env.NODE_ENV === 'production') { |
30 | 30 | const path = require('path'); |
31 | 31 | app.get('*', (req, res) => { |
32 | 32 | console.log ("NEXUS-__dirname: " + __dirname); |
33 | - console.log ("NEXUS-res:" + res); | |
33 | + console.log ("NEXUS-res:" + util.inspect(res)); | |
34 | 34 | res.sendFile(path.resolve(__dirname, 'client', 'build', 'index.html')); |
35 | 35 | }); |
36 | 36 | } |
... | ... | @@ -56,7 +56,7 @@ app.use(express.static(path.join(__dirname, "public"))); |
56 | 56 | app.use(passport.initialize()); |
57 | 57 | app.use(passport.session()); |
58 | 58 | |
59 | - | |
59 | +app.use("/", index); | |
60 | 60 | |
61 | 61 | // catch 404 and forward to error handler |
62 | 62 | app.use(function(req, res, next) { | ... | ... |