A full stack JavaScript app that allows you to search for images and see a list of recent queries.
- I can get the image URLs, alt text and page urls for a set of images relating to a given search string.
- I can paginate through the responses by adding a
?offset=2
parameter to the URL. - I can get a list of the most recently submitted search strings.
https://fcc-image-search-zklinger.herokuapp.com/api/imagesearch/
+ search terms
+ ?offset=10
Like:
https://fcc-image-search-zklinger.herokuapp.com/api/imagesearch/lolcats%20funny?offset=10
{
"url": "http://google.com/dsfa/adsfdfsasd?234/234234/2/ddsfsfd.jpg",
"snippet": "Funny lolcats (photo...",
"thumbnail": "http://google.com/dsfa/adsfdfsasd?234/234234/2/ddsfsfd.jpg",
"context": "https://fcc-image-search-zklinger.herokuapp.com/25",
}
To get a list of recent search terms:
https://fcc-image-search-zklinger.herokuapp.com/api/latest/imagesearch/
Built as a Node.js app using Express 4.
This application came from the Getting Started with Node on Heroku article - check it out.
Make sure you have Node.js installed and mongod
running.
$ git clone https://github.com/zklinger2000/fcc-image-search-zklinger.git
$ cd fcc-image-search-zklinger
$ npm install
$ npm start
Your app should now be running on localhost:5000.
For more information about using Node.js on Heroku, see these Dev Center articles: