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/
"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.
- 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/
- Clone the repo 👯♀️
git clone https://github.com/snphillips/art-thief.git
- Get into the correct directory
cd art-thief
- Install the dependencies for the node server 🏗
npm install
- Create a .env file where you will keep your API access token
touch .env
- 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.
- 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)
- To get the React client (front-end) working, follow the instruction in the following repo: https://github.com/snphillips/art-thief-client
- node/express (server)
- axios for API calls
- Cooper Hewitt Museum API
- redis to cache results for quick retrieval
- server hosted on Heroku