The saga continues with an epic garden of epicness!
>Create a new database called garden
and run the SQL in the database.sql
file.
- Run
npm install
- Start postgres if not running already by using
brew services start postgresql
- Run
npm run server
to start the server - Run
npm run client
to start the client - Navigate to
localhost:3000
src/
contains the React applicationpublic/
contains static assets for the client-sidebuild/
contains the transpiled code fromsrc/
andpublic/
that will be viewed on the production siteserver/
contains the Express App
- Added
redux-logger
middleware to the project for debugging - Added
redux-sagas
to the project to make an API request. The routehttp://localhost:5000/api/plant
returns an array of plants. Display that array on thePlantList
component on load. - Added all of the plant fields to the form to allow adding a new plant to the database. The server
post
route to do this is available athttp://localhost:5000/api/plant
. - Added a
Delete
button for each plant to allow it to be removed from the database. The serverdelete
route to do this is available athttp://localhost:5000/api/plant/1
, for the plant with theid
of1
.
- Added
material-ui
to the project to give the site an earthy color palette (green and brown?) - Use
react-router
so that when a user navigates tohttp://localhost:3000/#/plant/1
it displays the details for a given plant. The serverget
route to do this is available athttp://localhost:5000/api/plant/1
. Research URL Parameters for React Router