Code Monkey home page Code Monkey logo

Comments (7)

niftylettuce avatar niftylettuce commented on August 29, 2024

@jakeleboeuf have you had any luck?

from express-cdn.

jakeleboeuf avatar jakeleboeuf commented on August 29, 2024

Yea, no clue what happened, but it was just an issue with S3!

from express-cdn.

jakeleboeuf avatar jakeleboeuf commented on August 29, 2024

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.

niftylettuce avatar niftylettuce commented on August 29, 2024

@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.

jakeleboeuf avatar jakeleboeuf commented on August 29, 2024

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.

niftylettuce avatar niftylettuce commented on August 29, 2024

@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.

niftylettuce avatar niftylettuce commented on August 29, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.