Skip to content

Commit

Permalink
added app.get(*)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanchristie committed Sep 12, 2018
1 parent 94f1cc6 commit 4140566
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const path = require('path');

if (process.env.NODE_ENV === 'production') {
app.use(express.static(__dirname + '/client/build'));
}
}

app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, 'client/build', 'index.html'))
})

app.listen(PORT, () => console.log(`Listening on port ${PORT}`));
3 changes: 2 additions & 1 deletion services/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ passport.use(
new TwitterStrategy({
consumerKey: keys.twitterClientID,
consumerSecret: keys.twitterClientSecret,
callbackURL: 'auth/twitter/callback'
callbackURL: 'auth/twitter/callback',
proxy: true
},
async (accessToken, refreshToken, profile, done) => {
console.log(profile)
Expand Down

0 comments on commit 4140566

Please sign in to comment.