A full-stack Twitter clone app built using Node.js, Express.js, React.js, and MongoDB.
https://mw-twitter-clone.vercel.app/
The project was originally created a few years ago and as I have learned a lot since then I recently decided to update it and create the base for developing new features.
These instructions will get you a copy of the project up and running on your local machine.
Make sure you have a running MongoDB instance.
Copy the server/.env.example
file to server/.env
and update the values if your configuration is different than the default.
Install server dependencies
$ cd server
$ npm install
Install client dependencies
$ cd client
$ npm install
$ cd server
$ npm run dev
If everything was successful, you should see the messages being displayed in the terminal, telling that the server has successfully connected to a MongoDB and runs on a given port.
$ cd client
$ npm start
Now, the app should be running on http://localhost:3000
.
To test API routes
# run all tests
$ npm test
# or
# run all tests in watch mode
$ npm run test:watch
To run tests with Cypress first, copy the client/.env
file to a client/.env.local
. There is a default password for test users. You do not need to change that. Then simply run:
$ npm run cypress:open