Starter Template utilizing a React frontend and Express server. The Express server leverages a MySQL database for persistent storage, and JWTs in concert with Passport.js for authentication.
After cloning the repository:
PASSPORT_SECRET_KEY=<Generate Secret Key>
JWT_SECRET=<Generate Secret Key>
(make sure to add .env to gitignore if you're going to commit the project to source control)
cd client
npm install
Then do the same in the server directory
cd server
npm install
This project uses MySQL as its database. You will need to have a MySQL server installed and running on your machine.
The project assumes you're running a database named notes_app
on 127.0.01
, or you can create a new MySQL database and update the server/db.js file with your database information.
One the database is setup, from the server directory run:
npx sequelize-cli db:migrate
To start the server, run the following command in your terminal:
cd server
npm start
To run the React app, navigate to the client directory and run the following command in your terminal:
cd client
npm start