MERN-Shopping-List
To setup the backend
A shopping list app created using the MERN Stack
-
Use
npm init
to set up a new NPM package -
npm install express body-parser mongoose concurrently
express
is for the backend and creating routes
body-parser
reads the body of an incoming request
mongoose
interacts with the MongoDB database
concurrently
allows you to run multiple npm scripts at a time
-
npm install -D nodemon
Withnodemon
you don't have to restart the server every time you make a chage-D
is used since nodemon is a dev dependency and is not needed in any public releases -
Create a MongoDB database at mlab.com and add a new database user. Create a config folder with a keys.js file and export your database URI as a Javascript object.
-
Start the server using
npm run server
To add React
-
cd
into theclient
folder. -
npm install -g create-react-app
-
create-react-app .
To add Bootstrap
-
cd
into theclient
folder. -
npm install bootstrap reactstrap uuid react-transition-group
##To add Redux
-
cd
into theclient
folder. -
npm install redux react-redux redux-thunk