UNPKG

create-nodeapi-backend

Version:

A powerful Node.js backend boilerplate with Express, MongoDB, Firebase, JWT auth, Nodemailer, cron jobs, input validation (Joi), and serverless support for Vercel. Scaffold a full-featured API backend in seconds.

8 lines (7 loc) 144 B
module.exports.isLoggedIn = (req, res, next) => { if (req.user) { next(); } else { res.sendStatus(401); } };