Positive emotion, or "happiness", has been proven to fuel performance. The Happiness Primer is intended to provide a quick dose of positive emotion whenever you need it. This idea is based on the principles of Positive Psychology as described in Sean Achor's book, "The Happiness Advantage".
This project was created as a part of the Treehouse Full Stack JavaScript Techdegree program.
- The main page gives the user the option of viewing cute photos, funny gifs, or inspiring quotes
- The user can also search for specific categories of photos or gifs
- The Flickr API is used to display photos
- The GIPHY API is used to display gifs
- A MongoDB database is used to return the various motivational quotes
- Improve layout on smaller devices
- Add functionality to prevent repeated quotes
- Download project files by running
git clone https://github.com/LeeVaughn/happy-primer
- Navigate to the project folder
- Install dependencies with
npm install
- You will need to create your own .flickrCongif.js and .giphyConfig.js files for your API codes using this format:
const api_key = "...";
module.exports = api_key;
- These files should be saved in the root directory along with app.js
- You will also need to create a new MongoDB database named "quotes" and seed it with data from the seed-data directory
- Type
npm start
ornode ./bin/www
to run application (application runs on localhost:3000)
- axios Promise based HTTP client for the browser and Node.js
- body-parser Node.js body parsing middleware
- cookie-parser
- mongoose elegant MongoDB object modeling for Node.js
- morgan HTTP request logger middleware for Node.js