LoginSignup
0
0

More than 5 years have passed since last update.

AWS Elastic Beanstalk+Node.js+Express+Passport+MySQLでアカウント管理(その4)

Last updated at Posted at 2013-05-04

前回からの続き。

前回、ビューを作成しましたので、ルーティングも設定しておきます。
ルーティングは、routes/index.jsに記述されていますので、
これを修正します。

routes/index.js
exports.index = function(req, res){
  res.render('index', { title: 'Home', user: req.user });
};

exports.login = function(req, res){
  res.render('login', { title: 'Login', user: req.user, message: req.flash('error') });
};

exports.signup = function(req, res){
  res.render('signup', { title: 'Signup', user: req.user });
};

ルーティングはこれだけです。

続く

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0