Skip to content

Instantly share code, notes, and snippets.

View jonisar's full-sized avatar

Joni Sar jonisar

  • Team Bit
  • The milky way
View GitHub Profile
import { Bearer } from 'permit'
import express from 'express'
const permit = new Bearer({
basic: 'username', // Also allow a Basic Auth username as a token.
query: 'access_token', // Also allow an `?access_token=` query parameter.
})
function authenticate(req, res, next) {
// Try to find the bearer token in the request.
const divStyle = {
color: 'blue',
backgroundImage: 'url(' + imgUrl + ')',
};
function HelloWorldComponent() {
return <div style={divStyle}>Hello World!</div>;