Created
February 17, 2017 14:43
-
-
Save WORMSS/4eb2469274ff55a6e76ead6604764242 to your computer and use it in GitHub Desktop.
View parts of Express.Route
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Router = require("express").Router; | |
///........ | |
const ensuredLoggedIn = require('connect-ensure-login').ensureLoggedIn(); | |
var app = new Router(); | |
app.get("/", ensuredLoggedIn, (req, res) => { | |
// ............. | |
}); | |
app.get("/page/:page", ensuredLoggedIn, (req, res) => { | |
//.......... | |
}); | |
module.exports = app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .............. | |
const express = require("express"); | |
const app = express(); | |
// .......... | |
// This is where my previous gist for OAuth was | |
// ......... | |
app.use("/........", require("./routes/........")); | |
app.use("/........", require("./routes/........")); | |
app.use("/........", require("./routes/........")); | |
app.use("/flitetest", require("./routes/flitetest")); | |
// Fallback view route. | |
app.use(express.static(require("path").join(__dirname, "public"), { "extensions": ["html"] })); | |
app.listen(3000, () => { | |
console.log("server started"); | |
}); | |
// .............. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment