stack overflow clone made using the MERN stack.
This Stack Overflow clone was made in two months for a class. It closely resembles Stack Overflow in functionality, having user management and other CRUD functionality.
The frontend uses React and Typescript through Vite. Install dependencies in the client folder with
npm installRun the development server from the client folder with
npm run devThe local development server should be hosted on http://localhost:3000
The backend uses Typescript, so you can't just run it through Node. Use these npm scripts to initialize and run them from the server folder.
npm installMake sure MongoDB is started on your computer and the port is in its proper configuration for the project (mongodb://127.0.0.1:27017/fake_so)
Initialize the database in the server folder with
npm run init <admin-username> <admin-password>(Replace <admin-username> and <admin-password> with the username and password of your choice.)
Start the express server from the server folder with
npm run startYou can run jest unit tests from the server folder. Make sure MongoDB is started with the proper config.
npm testWarning: You will need to reset the database after running.