-
-
Save parzibyte/7fe1dc9e4a2fdada2c298371243f4f4e to your computer and use it in GitHub Desktop.
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
// Primero usar la sesión | |
app.use(session({ | |
// Se recomienda cambiar en cada entorno | |
// https://parzibyte.me/blog/2020/06/02/sesiones-node-express-js/#Configurar_uso_de_sesion | |
secret: "123", | |
saveUninitialized: true, | |
resave: true, | |
cookie:{ | |
maxAge: 60000, | |
} | |
})); | |
// Y después definir las rutas! | |
app.use('/', indexRouter); | |
app.use('/productos', productosRouter); | |
app.use('/usuarios', usuariosRouter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment