Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web2blob

Package Overview
Dependencies
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web2blob

Upload all your web assets to Azure Blob Storage with a simple command!

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
8
Created
Source

web2blob

npm version Build Status npm downloads

A small utility to upload your web assets to Azure Blob Storage. The idea is that after you build your website with tools like Create React App, you could upload it to a blob, and then put a CDN in front of it.

Requirements

This application requires Node 4+ to run.

What differences does it have with Azure CLI upload-batch?

  • Will infer the Content-Type for all your files.
  • Will gzip the files for you.
  • Will set a Cache-Control for regular assets, and a long cache for static assets.

Install

As a CLI tool

npm install -g web2blob

As a library

npm install --save-dev web2blob

CLI

web2blob -s webfolder -d container [options]

Run web2blob --help to get a quick overview of all commands.

API Usage

const web2blob = require('web2blob');

const options = {
  source: './build', // Path of the folder where to upload the assets.
  destination: 'myweb', // Name of the blob container where to upload.

  // Default options (no need to pass them)
  cache: 3600, // Time in ms to cache regular files.
  maxConnections: 5, // Max simultaneous connections to the blob.
  statics: 'static', // Folder where to cache files for 1 year.
  zip: true // Whether to gzip the files or not.
};

web2blob(options)
  .then(() => {
    // Files uploaded succesfully to the blob.
  })
  .catch(error => {
    // Something happened.
  });

FAQs

Package last updated on 02 Aug 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc