davedevx / unsplash-photos

Unsplash Photos - get list of popular / latest / oldest photos or search by keyword.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unsplash Photos

You can get a list of popular/latest/oldest photos or search by keyword using Unsplash's API and unsplash-js library.

This app is built with NodeJS / Express, and React with Create React App and is fully responsive.

Styles are by Bulma and Ant Design.

You can configure some app settings via .env:

  • PHOTOS_PER_PAGE (number of images during search, max: 30)
  • UNSPLASH_CLIENT_ID (head over to this page, create a developer account and paste your Client-ID)

Installation

$ git clone https://github.com/daveedx/unsplash-photos.git
$ cd unsplash-photos
$ yarn install

Start server (NodeJS / Express) by:

$ yarn run server

then open a separate terminal and start client (React) app by:

$ yarn start

Usage

Server runs on port 8080. Client app runs on port 3000 by default. If this port is in use by another app, you will see what port is used instead.

Once Client app is ready, it opens http://localhost:3000/ in your browser.

On the homepage you can see the most popular photos from Unsplash. You can change the selection by changing Order by to 'Popular / Latest / Oldest'.

On the search page (you can find in in the menu) once you enter a keyword and hit enter, you will find photos loaded from Unsplash regarding to the keyword you have entered before. Pagination is handled by a button (Load more...) which loads another portion of photos.

About

Unsplash Photos - get list of popular / latest / oldest photos or search by keyword.


Languages

Language:JavaScript 90.2%Language:HTML 6.9%Language:CSS 3.0%