Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Getting error 'CDN is not a function' in jade in production mode #88

Open
Nishant-Pathak opened this issue Oct 13, 2015 · 3 comments
Open

Comments

@Nishant-Pathak
Copy link

Hi,
Was stuck with getting error while starting nodejs server, using in jade file as:

script(src=CDN("config.js"))
script(src=CDN("js/login.js"))

<<<

configured as:

var CDN = require('express-cdn')(app, options); (options as defined properly as mention in README)
app.locals.CDN = CDN();

with expressjs version as: 4.13.3v

Please tell if you need more.

@Nishant-Pathak
Copy link
Author

@niftylettuce Hi Nick, Any idea what I am doing wrong here ? Thanks.

@nathanredblur
Copy link

You not need use script

!= CDN("config.js")
!= CDN("js/login.js")

The script figure out what to do in the way that the output will what you want. (magic inside, I don't like that magic, but... what ever)

@ghost
Copy link

ghost commented Jan 14, 2016

Thanks, will test and update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants