This project was bootstrapped with Create React App.
Most of the scaffolding was left untouched, with changes in the following locations:
- package.json
- all of /server
- src/Components/NewLineItem.js
- src/App.js
- .gitignore
The test files included here are part of the create-react-app, I did not touch them.
- Install NPM. I used version 10.9.2.
- Install MySQL. I used version 8.0.30 for MacOS on x86_64. Ensure the MySQL server is running.
- Clone this repository.
All instructions below assume operation from within the root of this directory.
- Create a file named
.env. Here, add four variables: DB_NAME=<YOUR_DB_NAME>, DB_PASSWORD=<YOUR_DB_PASSWORD>, DB_HOST=<YOUR_DB_HOST>, and DB_USER=<YOUR_DB_USER>. These will be used by the server to connect to your MySQL database. For me, DB_HOST and DB_USER are "localhost" and "root", respectively (without quotations). - run
npm installto install all dependencies. - run
npm run serverto start the server. This will initialize the tables for the database defined in.envthe first time the server boots up. - run
npm run start. This will start the frontend of the application, populating any timesheets that already exist.
As updates are made to the timesheets, they are saved to the database, and users can come back later.