Click the change giphy button to view twenty-five randomly trending gifs and search for a gifs such as 'cats'.
a maximum of 42 search requests an hour, 1000 search requests a day
- React
- Giphy API https://developers.giphy.com/docs/
- Express https://expressjs.com/en/starter/installing.html
- Node.js https://nodejs.org/en/ https://www.npmjs.com/
- Material UI https://material-ui.com/getting-started/installation/
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Register for an account here: https://developers.giphy.com/docs/#api-keys. Clicke Create an app to get your API Key.
- Download this project.
- open in editor (ex. VS code)
- open a terminal window (control ~)
- npm install
- If you don't already have
nodemon
, install it globally withnpm install nodemon --global
. Running the server code requiresnodemon
. - Create a .env file and add your API key to the line below. then, copy and paste the line into the .env file.
- GIPHY_API_KEY=YOUR_KEY_GOES_HERE
- In seperate terminal windows (open a new termainal tab with
cmd + t
)you'll need two terminal tabs because we're usingnodemon
: a. npm run server b. npm run client
Sign up for an account at https://signup.heroku.com/
You may have to give them a credit card, but you shouldn't need to pay for anything
Install Heroku CLI by typing brew install heroku
in Terminal
Authenticate by typing heroku login in Terminal
Note: Your project also needs to have a git repository.
-
In terminal, navigate to the project folder and type
heroku create
-
Login in if prompted
-
Type
git remote -v
to ensure it added successfully -
Make sure your PORT is configured correctly as:
const PORT = process.env.PORT || 5000;
-
Remove the build/ line from your .gitignore
-
start script in your package.json starts your node server and not React (Heroku won't need to build the React app) a. "start": "node server/server.js",
-
Make sure your package.json contains a build script: a. "build": "react-scripts build"
-
npm run build
-
git Commit
-
git add .
-
git commit -m "YOUR COMMIT MESSAGE"
-
git Push
-
Push to heroku
git push heroku master
Every time you make a change to the code that you want to see in Heroku: You'll have to make sure you run a build, then commit, then and push to Heroku. Every time.
More detailed instructions found here: https://devcenter.heroku.com/articles/git
- Feature displayRandomGiphy -- get a random trending giphy from the Giphy Api by pressed the change giphy button
- Feature giphySearch -- search for a giphy
- Feature mongoDatabase -- add mongo database to store favorite giphy urls
- Feature addToFavorites -- add ability to select giphys as favorites
- Feature favoritesComponent -- component that displays all favorite gifs