Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.use(
- express.static(path.join(__dirname, "/public"), {
- maxage: 86400000 * 7
- })
- );
- app.get("/user*", function(req, res) {
- if (req.session && req.session.logged) {
- res.sendFile(
- path.join(__dirname, "/public", "/pages", "/dashboard", "index.html")
- );
- } else {
- res.redirect("/");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement