// create token const token = createToken({id:user._id}, '365d') export const createToken = (payload, exp) => { return jwt.sign( payload, process.env.JWT_SECRET_KEY, { expiresIn:exp }) }