Node.js Express Firebase Can't set headers after they are sent
问题 I'm having problems saving data to Firebase and then redirecting to another page. I'm getting Error: Can't set headers after they are sent. I have read all the questions around this area on Stack but I can't get the following to work. app.route('/blog-add') .get(function(req, res){ var blogData = new Firebase(firebase_url+'blogs/'); var authData = blogData.getAuth(); var priority = 0 - Date.now(); if(authData == null) { res.redirect('/'); return; } else { var auth = authData.auth.uid; res