Skip to content

A node/express project to retrieve random images of the the Cooper Hewitt Museum's collection. Pairs with art-thief-client, which is a React front-end.

License

Notifications You must be signed in to change notification settings

snphillips/art-thief

Repository files navigation

Art Thief

NOTE: THIS REPO CONTAINS THE BACK END SERVER(BACK-END). THE CLIENT(FRONT-END) REPO CAN BE FOUND HERE: https://github.com/snphillips/art-thief-client

View Art Thief deployed here: https://art-thief.surge.sh/

Project Description

"Good artists copy; great artists steal."

I don't know about that, but I do know that a good way to dislodge a creative block is to inspired by the work of the great artists, designers and creators that have come before us.

Art Thief allows users to view random images from the Cooper Hewitt Museum's collection, based on selected keywords such as angular, art deco, modernism etc.

Art Thief is a project to experiment with the Cooper Hewitt Museum's wonderful API. https://collection.cooperhewitt.org/api/

The server (back end) is Node/Express.

The client (front end) is React.

screengrab of app

screengrab of app

screengrab of app mobile view

screengrab of app mobile view

screengrab of app mobile view

Geetting Started

  1. Get an API access token from the Cooper Hewitt Museum.

Copy this token and save it for later. Give it delete access: https://collection.cooperhewitt.org/api/oauth2/authenticate/like-magic/

  1. Clone the repo 👯‍♀️

git clone https://github.com/snphillips/art-thief.git

  1. Get into the correct directory

cd art-thief

  1. Install the dependencies for the node server 🏗

npm install

  1. Create a .env file where you will keep your API access token

touch .env

  1. Paste the following into your .env file but reaplace YOUR ACCESS TOKEN with the Cooper Hewitt Museum token you saved from step 1). Remember to put the token in quotes as it's a string.

COOPER_API_TOKEN='YOUR ACCESS TOKEN'

note: you'll notice that the .env is listed in the .gitignore. This is to keep your access token safe from prying eyes.

  1. get the node server running

npm run dev

Open a browser to http://localhost:8888/

You should see a mostly white scren with the phrase: Hello world, let's steal some art.

(TODO insert instructions about how to swictch between development and production)

Now check to see if you can hit the Cooper Hewitt Museum's API by pasting the following into your browser: http://localhost:8888/searchbytag/memphis

You should see a json object listing information about the museum's collection with the keyword memphis. Yay! 🧚‍♀️

(TODO: describe reason for Redis error and how to get around it)

  1. To get the React client (front-end) working, follow the instruction in the following repo: https://github.com/snphillips/art-thief-client

Built With

  • node/express (server)
  • axios for API calls
  • Cooper Hewitt Museum API
  • redis to cache results for quick retrieval
  • server hosted on Heroku

About

A node/express project to retrieve random images of the the Cooper Hewitt Museum's collection. Pairs with art-thief-client, which is a React front-end.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published