A site where users can find, share, and save their favorite recipes. On your first visit to EasyEats, you can search for recipes by name, by ingredient, or by the username of the person who created that recipe. After completing signup/login with our robust user authentication, users will be able to contribute their own recipes to our database and save starred recipes to their profile page. While our authentication system is functioning, we are still working out some bugs with username searches and users adding recipes. This app uses Node/Express for the server and routing, MySQL/Sequelize for the database and models, Handlebars for the layout and views, & two recipe search APIs (Recipe Puppy & Food2Fork). The custom user authentication was built using UUID, bcrypt, and JSON Web Token.
Team Members
These instructions will get you a copy of the project up and running on your local machine for development. I will assume that you already have Node.js and MySQL installed locally. See deployment for notes on how to deploy the project on a live system.
- Install dependencies
- Add keys.js
- Sequelize setup
- In your CLI, go to the root of your project directory and enter node server.js
- In your browser, navigate to http://localhost:3000
You will need to npm install the following node modules:
- express
- express-handlebars
- method-override
- body-parser
- bluebird
- bcrypt
- jsonwebtoken
- uuid
- mysql
- mysql2
- sequelize
Since we have included a package.json file, you do not need to install dependencies by name. Simply run the following in the root of your directory:
npm install
If you want to use the Food2Fork API, you must register with them (free!) to get an API key. Put your key inside a keys.js file in the root of your project directory and export for use elsewhere in the app.
var keys = {
food2fork_key: "yourAPIkeyhere"
};
module.exports = keys;
Initialize your sequelize app by entering the following command in your CLI:
sequelize init:config init:models
This will generate a config folder including a config.json file. Ensure that the contents of the "development" object match the details of your local mysql database.
Follow these instructions to deploy your app live on Heroku
- Create a heroku app in your project directory
heroku create <projectName>
- Provision JawsDB MySQL add-on for your project
heroku addons:create jawsdb
- Go back to your config.json file and replace the contents of the "production" object with the details of your JawsDB database.
- Create a new connection to MySQL using your JawsDB connection info. Manually create the tables that you will need to store data.
Now your project should be successfully deployed on heroku with a functioning database.
Search by recipe name, ingredient, and username
Recipe Results
- Fix username search and adding recipes
- Polish recipe results page