In-house meal planning tool with a node.js backend and react front-end. This version retires my similar meal-planner php project.
node_modules is versioned because a stackoverflow post convinced me it should be.
This project requires a mySQL database with a table mealplanner.recipe with the following columns:
- rid - PK AI Row/Recipe id
- prep-inst - Preperation instructions
- cook-inst - Cooking instructions
- serve-inst - Serving instructions
- ingredients - JSON formatted array of ingredient objects
Here's a dummy ingredient:
[
{
iName: 'chicken breast',
unit: 'x',
amount: 3
},
{
iName: 'Honey',
unit: 'TBSP',
amount: 1.5
}
]
Once the server.js is running, you can go to localhost:3000 to use the app.
The assumption is you already have node installed on your computer.
You might have to build the webpack before running the server. I'm newer to react/node, so here's how I do it with GIT Bash:
- Navigate to the folder containing the react-meal-planner project
- Right click on the folder, open in GIT Bash
$ NODE_EVN=production node_modules/.bin/webpack -p
$ NODE_ENV=production node_modules/.bin/babel-node --presets react,es2015 src/server.js