Skip to content

Commit

Permalink
✨ CDN for product images
Browse files Browse the repository at this point in the history
cdn.dummyjson.com is hosted on AWS CloudFront and all the images will be cached globally by CloudFront, and we will be testing it for a few days.
  • Loading branch information
Ovi committed Jan 6, 2024
1 parent 956884c commit 0383e70
Show file tree
Hide file tree
Showing 2 changed files with 539 additions and 544 deletions.
5 changes: 0 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ app.set('view engine', 'ejs');
// serving static files
app.use('/static', express.static('./public'));

// serving internal (products) images
app.use('/image/i', (req, res) => {
res.redirect(`https://i.dummyjson.com/data${req.path}`);
});

// routes
app.use('/', routes);

Expand Down
Loading

0 comments on commit 0383e70

Please sign in to comment.