Skip to content

Commit

Permalink
updating express-jwt usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jkyberneees committed Dec 8, 2022
1 parent 3dc2724 commit 6884bce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion demos/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
const gateway = require('./../index')
const PORT = process.env.PORT || 8080

var { expressjwt: jwt } = require('express-jwt')

gateway({
middlewares: [
require('cors')(),
Expand All @@ -24,7 +26,7 @@ gateway({
prefix: '/admin',
target: 'http://localhost:3001',
middlewares: [
require('express-jwt')({
jwt({
secret: 'shhhhhhared-secret',
algorithms: ['HS256']
})
Expand Down

0 comments on commit 6884bce

Please sign in to comment.