This file contains hidden or 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
in vite.config | |
add base: "/" for custom domains | |
add base: "/<repo-name/" for github pages | |
install gh-pages - yarn add gh-pages -D | |
scripts | |
predeploy: "npm run build", | |
"deploy": "gh-pages -d dist" |
This file contains hidden or 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
app.use((req,res,next)=>{ | |
res.locals.currentUser = req.user; | |
res.locals.success = req.flash("success"); | |
res.locals.error = req.flash("error"); | |
next(); | |
}); |