npx express-generator --view=hbs node-react-auth
cd node-react-auth
npm audit fix --force
npx create-react-app client
cd client
npm audit fix --force
cd ..
- Create a .gitignore file
- Create a README.md file
- Create and connect to a github repo
git init
- Prefer main over master as your primary branch?
- Create React App with an Express backend
- Deploying a React app with React-Router and an Express Backend
npm i mongoose
Mongoose npmnpm i -D mongoosejs-cli
Mongoose npm clitouch .mongooserc
and setup the file to use a db root directory as shown on the cli websitenpx mongoosejs-cli init
to add mongo db setup to application- Notice you now have a db folder with models in it
npx mongoosejs-cli model:create --name User --attributes name:String,email:String,password:String
npx mongoosejs-cli seed:create --name AddUser
- to populate users- Add bcrypt npm
npm i bcrypt
- Add initial user with Seeds
npm run seed