New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

bs-compression

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-compression

Bucklescript bindings for Compression middlewaare

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

bs-compression

Bucklescript Bindings for compression express middleware. compression is a Node.js compression middleware.

Prerequisites

npm install --global bs-platform
yarn install

How to compile

yarn build

Usage

This package can be used only with bs-express. Make sure you already have bs-express as a dependency in your project.

yarn add bs-compression

And add bs-compression to dependencies node of your bsconfig.json.

Code snippets

For instance, here is the code to serve static files from public folder and compress them. Remark: The compression middleware must be passed first in the array of middlewares.

let app = express();
App.useOnPathWithMany(
  app,
  ~path="/public",
  [|
  Compression.compression(),
  {
    let options = Static.defaultOptions();
    Static.make("public", options) |> Static.asMiddleware
  }
  |]
);

Keywords

bucklescript

FAQs

Package last updated on 12 Mar 2018

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