This repository was archived by the owner on Mar 18, 2022. It is now read-only.

Description
Using this in my node:
var options = {
publicDir: path.join(__dirname, 'build'),
viewsDir: path.join(__dirname, 'views'),
domain: 'mycdn-herokuapp-com.global.ssl.fastly.net',
production: true,
bucket: process.env.S3_BUCKET,
key: process.env.AWS_ACCESS_KEY_ID,
secret: process.env.AWS_SECRET_ACCESS_KEY,
hostname: 'www.vcap.me',
port: (isSSL ? 443 : PORT),
ssl: isSSL
};
var CDN = require('express-cdn')(app, options);
app.enable('view cache');
app.locals.CDN = CDN();
Getting this error when I switch production to true:
Error: Command failed: /bin/sh -c npm start
js-bson: Failed to load c++ bson extension, using pure JS version
/Users/bostondevin/Desktop/mogwai/node_modules/express-cdn/lib/main.js:528
fileName = assets.substr(1);
^
TypeError: assets.substr is not a function