0
的NodeJS
- 登錄
- 聊天
- 文件共享設置了獨立的工作模塊。
我想將它們全部結合起來。就像獲得成功登錄後,我希望它重定向到聊天模塊。現在我可以在登錄後重定向到靜態html頁面。
app.post('/login', passport.authenticate('local-login', {
successRedirect : '/profile', // redirect to the secure profile section
failureRedirect : '/login', // redirect back to the signup page if there is an error
failureFlash : true // allow flash messages
}));
注:現在,如果我要運行任何模塊,我必須單獨編譯並在本地主機上運行它。