Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't make a route other than root '/' #96

Open
LMS007 opened this issue Apr 23, 2017 · 2 comments
Open

Can't make a route other than root '/' #96

LMS007 opened this issue Apr 23, 2017 · 2 comments

Comments

@LMS007
Copy link

LMS007 commented Apr 23, 2017

I'm trying to integrate this with my app but I'm using the root route for the home page "/"

app.get('/' ....

So, since that is taken, then I would like something like this for my images...

app.get('/images/*?', function(request, response){
  var image = new Img(request);
  image.getFile()
    .pipe(new streams.identify())
    .pipe(new streams.normalize())
    .pipe(new streams.resize())
    .pipe(new streams.filter())
    .pipe(new streams.optimize())
    .pipe(streams.response(request, response));
});

However that forces me to have all my images in an images folder in my S3 bucket and I don't like have that not-so-explicit coupling between my app and S3. Is there some config I'm not aware of?

@teohhanhui
Copy link

teohhanhui commented May 2, 2017

I'd recommend using a separate subdomain. This project was designed to be placed behind a CDN, so I think that makes a lot of sense.

(This project has been inactive for a long time. You might want to check out our fork at https://github.com/tripviss/image-resizer)

@LMS007
Copy link
Author

LMS007 commented May 4, 2017

Yep, I'm using tripviss too, otherwise it wouldn't install correctly. Yes, a separate domain makes sense, thanks for tie suggestion.

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

No branches or pull requests

2 participants