🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

evervault-express

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

evervault-express

Express.js middleware that injects the evervault SDK and sets up evervault auth

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

evervault-express

NPM Version NPM Downloads

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install evervault-express

API

// replace `YOUR APP ID` with the app ID given to you in the evervault dashboard
const evervault = require('evervault-express')('YOUR APP ID')

evervault(appId)

Injects the evervault SDK for the given appId.

Note The middleware appends a <script/> tag for evervault's SDK to the response body.

Warning The middleware does not check the Content-Type header and appends the <script/> tag to all responses. Only apply it to specific routes if you have routes that return non-HTML responses.

Example

A simple example using evervault-express to integrate evervault auth and SDK.

const express   = require('express')
const evervault = require('evervault-express')

const app = express()

app.use(evervault('hello-world'))

app.get('/', (req, res) => {
  res.send('This app will be protected with evervault auth. The evervault SDK will also be included.')
})

License

MIT

FAQs

Package last updated on 14 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts