Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miyamotodev123/6fb89abaf1ba26e4e27f to your computer and use it in GitHub Desktop.
Save miyamotodev123/6fb89abaf1ba26e4e27f to your computer and use it in GitHub Desktop.
// server.js
...
app.use(express.static(path.join(__dirname, '/public'))); //Expose /public
// routes ======================================================================
require('./app/routes.js')(app, passport); // load our routes and pass in our app and fully configured passport
// catch all other routes and have index.html handle them.
app.get('*', function (req, res){
res.sendFile(path.join(__dirname+ '/public/views/index.html'));
});
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment