Follow the steps below to install dependencies, configure your environment, seed the database, and run the project for both the server and the client.
- Clone the repository.
git clone https://github.com/ckane-sbu-s25-cse316/project-s25-solo_botzhou.git
- Navigate to the project root directory:
cd project-s25-solo_botzhou
- Install dependencies for the Node server:
cd ./server
npm install
- Install dependencies for the React client:
cd ../client
npm install
- Open a new terminal window.
- Start MongoDB using the appropriate command for your operating system:
- macOS:
brew services start mongodb-community
- Windows:
mongod
- Open a new terminal window and navigate to the project root:
cd project-s25-solo_botzhou
- Run the seeding script to seed the database. It takes four command-line arguments:
- MongoDB URL
- Admin email
- Admin display name
- Admin password
Example:
node ./server/init.js mongodb://127.0.0.1:27017/phreddit admin@phreddit.com admin 1234
- Open a new terminal window and navigate to the project root for the Node server:
cd project-s25-solo_botzhou/server
- Start the Node server using nodemon:
nodemon server.js
- Open a new terminal window and navigate to the project root for the React client:
cd project-s25-solo_botzhou/client
- Start the React development server:
npm start
- Ensure both MongoDB and the Node server are running.
- Open a new terminal window and navigate to the project root for the Node server and run the tests:
cd project-s25-solo_botzhou/server
npm test
- Open a new terminal window and navigate to the project root for the React client and run the test:
cd project-s25-solo_botzhou/client
npm test
Bote Zhou
Bote developed both the front end and back end of the project, wrote unit tests, and created the UML diagrams.