This is a clone of Facebook built using the Express.js framework for Node.js, with a MongoDB database and Handlebars templates for the front end. It was a group project as part of Makers Academy and we named our website Bettah. Like Meta, but Bettah!
It uses:
- Express web framework for Node.js.
- Nodemon to reload the server automatically.
- Handlebars to render view templates.
- Mongoose to model objects in MongoDB.
- MongoDB our database.
- ESLint for linting.
- Jest for testing.
- Cypress for end-to-end testing.
- Javascript our coding language.
- [HTML]
- [CSS]
- A user can make a post on acebook.
- A user can view a post on acebook.
- A user can sign up, and then log into acebook.
- Start time 10am
- Lunch 1pm - 2pm
- End day 5:30pm
-
Breaks decided amongst pairs.
-
Two pairing slots.
-
Morning 10.15am - 1pm.
-
Afternoon 2pm - 5:30pm.
-
Stand ups. 10am-10:15am.
-
Retro. 5:30pm.
-
Additional Stand ups before or after lunch for planning and estimation of tickets. When needed.
- Users can friend each other.
- Use cloud server for database
- Deploy website on Heroku
- Install Node Version Manager (NVM)
Then follow the instructions to update your
brew install nvm
~/.bash_profile
. - Open a new terminal
- Install the latest version of Node.js, currently
18.1.0
.nvm install 18
- Fork this repository
- Clone your fork to your local machine
- Install Node.js dependencies
npm install
- Install MongoDB
brew tap mongodb/brew brew install [email protected]
- Start MongoDB
brew services start [email protected]
- Start the server
npm start
- Browse to http://localhost:3000
The server must be running locally with test configuration for the integration tests to pass.
npm run start:test
This starts the server on port 3030
and uses the acebook_test
MongoDB database,
so that integration tests do not interact with the development server.
- Run all tests
npm test
- Run a check
npm run lint # linter only npm run test:unit # unit tests only npm run test:integration # integration tests only
Some people occasionally experience MongoDB connection errors when running the tests or trying to use the application. Here are some tips which might help resolve such issues.
- Check that MongoDB is installed using
mongo --version
- Check that it's running using
brew services list