An Express REST API service, Python web scraper, and MySQL database for breads.io. See breads-client for front end code and more details about the project.
After you have forked the project and downloaded the code, install the necessary dependencies using npm or yarn.
To install the packages through npm, run the command npm install
To install the packages through yarn, run the command yarn add
NOTE: In the rest of the documentation, you will come across npm being used for running commands. To use yarn in place of npm for the commands, simply substitute npm for yarn. Example, npm start
as yarn start
. For more help, checkout migrating from npm.
After installing dependencies and creating a local mySQL database,
mysql -u [USERNAME] -p [DATABASE] < mysql/tables.sql
- create tablesmysql -u [USERNAME] -p [DATABASE] < mysql/import.sql
- import data
LOCAL_CORS
- frontend url (i.e. 'http://localhost:3000')
MySQL
LOCAL_HOST
- local MySQL hostnameLOCAL_USER
- local MySQL usernameLOCAL_DBPASSWORD
- local MySQL passwordLOCAL_DB
- local MySQL database name
JWT - create a secret key for JWT based authentication
SECRET_KEY
- JWT secret key
Cloudinary - Used for image hosting. Set up a free account to get a cloud name, API key, and API Secret (only needed if working on user CRUD)
CLOUDINARY_CLOUD_NAME
- Cloud NameCLOUDINARY_API_KEY
- API KeyCLOUDINARY_API_SECRET
- API Secret
Link Preview - Used as a fallback for the webscraper. Set up a free account to get an API key (only needed if working on webscraper)
LINK_PREVIEW_KEY
- API Key
Nodemailer - Used to send password reset emails. Add an email login information (only needed if working on reset password feature)
EMAIL_LOGIN
- email addressEMAIL_PASSWORD
- email passwordEMAIL_URL
- frontend url (i.e 'http://localhost:3000')
There are currently no tests. (This would be a great way to contribute!)
- Keep your fork in sync with this repository (how to merge conflicts):
# Add a new remote upstream repository
git remote add upstream https://github.com/zero-to-mastery/breads-server.git
# Sync your fork
git fetch upstream
git checkout master
git merge upstream/master
- Push changes to your repo:
git push origin master
-
In your repo GitHub page, create a pull request to the
development
branch. This will allow us to see changes in a staging environment before merging tomaster
. -
If everything runs correctly, your pull request will be merged into
master
.