Skip to content

Instantly share code, notes, and snippets.

View KelvinCampelo's full-sized avatar

Kelvin Campelo Alves de Sousa KelvinCampelo

  • PETE
  • Portugal
View GitHub Profile
@KelvinCampelo
KelvinCampelo / index.js
Last active February 6, 2020 20:17
jwt route protection example node
import { Router } from 'express'
import { create } from './controller'
import jwt from 'jsonwebtoken'
const router = new Router()
router.post(
'/things',
only(['admin','customer']),
create