Comments (7)
@jakeleboeuf have you had any luck?
from express-cdn.
Yea, no clue what happened, but it was just an issue with S3!
from express-cdn.
Only other question-
I followed the steps in your readme to setup my cloudfront distribution- Everything is in my bucket, but it looks like it's all private because I'm getting a "access denied" error when I try to navigate to my css/js/image files. I went into the s3 console and manually made everything public which did the trick, but should that be necessary? Do I need to create a bucket policy or anything? Oorr, maybe cloudfront takes a little bit to distribute?
from express-cdn.
@jakeleboeuf I released 1.0.3 that explicity sets x-amz-acl
to public-read
, please try downloading the latest version from NPM, see 6975fd5
from express-cdn.
Bingo. Thanks! Okay, laaasttt question-
How would I include a script like this:
script(src='/javascripts/app.js', defer, onload="require('initialize');")
With jade, I tried:
!= CDN('/javascripts/app.js', { 'defer': 'true' , 'onload': 'require("initialize");' })
Looks like it's having a hard time handling the require('initialize');
piece.
from express-cdn.
@jakeleboeuf you could define your CDN calls as variables like here #41 (comment) and then just say with jade:
script(src=someCdnVar, defer=true, onload='require("initialize")')
from express-cdn.
@jakeleboeuf e.g.
- var appJs = CDN("/javascripts/app.js", { "raw" : true })
script(src=appJs, defer=true, onload='require("initialize")')
if this helped, please see the note donate badge on the readme of this repo 👍
from express-cdn.
Related Issues (20)
- Express CDN doesn't support video/mp4
- Error when installing express-cdn HOT 2
- Error during install on node 6 due to outdated optipng-bin and jpegtran-bin dependencies HOT 2
- Files do not upload to s3 HOT 2
- BUG : removing the first character of file path HOT 1
- production true is giving errors
- Action required: Greenkeeper could not be activated 🚨
- When Uglify fails, it doesn't tell which file is failing it. HOT 1
- Older version of clean-css leaving truncated files HOT 1
- Error: TypeError: assets.substr is not a function
- Getting error after latest update HOT 2
- File file.js comes to S3 without content. HOT 2
- 0.31 and 0.32 releases are broken by UglifyJS 3.X HOT 2
- In package.json update dependency on 'request' module to 2.88.0
- BUG: timestamp cache not set properly
- Concatenating files doesn't produce a URL-encoded CDN address HOT 2
- Working with vars
- Explicitly define list of assets HOT 1
- Private bucket support
- Asset versioning in production HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-cdn.