Nutritional meal recommender app By Ian Hafkenschiel
Copyright 2021 All rights reserved. Distribution of the software in any form is only allowed with explicit, prior permission from the owner.
- Create a MySQL database called
eatcomplete
based off of the schema insetup/db-schema.sql
and load data - Clone the
.env.template
file as.env
in the project root and add your MySQL credentials
To generate a new Sequelize model from an existing MySQL database:
node_modules/.bin/sequelize-auto -h 127.0.0.1 -d DB_NAME -u DB_USER -x DB_PASSWORD -p 3306 --dialect mysql -c /FULL_PATH/eatcomplete-react-express/src/config/sequelize-auto-settings.json -o /FULL_PATH/eatcomplete-react-express/src/models
Change for your environment: DB_NAME, DB_USER, DB_PASSWORD, FULL_PATH's
yarn
Run server:
yarn start:local
This will start up a node.js express server on port 9999
and run create-react-app on port 3000
Nodemon will auto hot-reload on any changes in the server directory, while create-react-app will auto hot-reload any changes in front-end directory
Run frontend from repo eatcomplete-frontend-react
http://localhost:9999/graphql
will display graphql testing ground
You can also use Postman with http://localhost:9999/
to access the API
yarn build:server
This will compile the server TypeScript code into a dist
directory in the root directory
- Package Manager - Yarn
- Linter - ESLint + Airbnb Style
- Formatter - Prettier
- Pre-commit hooks - Husky
- Language - TypeScript *WIP
- Backend server - Node.js
- Backend API framework - Express.js
- Database - MySQL
- ORM - Sequelize
- Query Language/Server - Apollo + GraphQL
- Not yet implemented