Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
John Forster committed Mar 11, 2022
1 parent b791c11 commit a20e4db
Showing 1 changed file with 37 additions and 35 deletions.
72 changes: 37 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This is a Node.js template for the Acebook engineering project.

It uses:

- [Express](https://expressjs.com/) web framework for Node.js.
- [Nodemon](https://nodemon.io/) to reload the server automatically.
- [Handlebars](https://handlebarsjs.com/) to render view templates.
Expand All @@ -20,74 +21,75 @@ REPLACE THIS TEXT WITH A LINK TO YOUR CARD WALL
### Install Node.js

1. Install Node Version Manager (NVM)
```
brew install nvm
```
Then follow the instructions to update your `~/.bash_profile`.
```
brew install nvm
```
Then follow the instructions to update your `~/.bash_profile`.
2. Open a new terminal
3. Install the latest long term support (LTS) version of [Node.js](https://nodejs.org/en/), currently `12.14.1`.
```
nvm install 12.14.1
```
3. Install the latest long term support (LTS) version of [Node.js](https://nodejs.org/en/), currently `16.14.0`.
```
nvm install 16
```

### Set up your project

1. Fork this repository
2. Rename your fork to `acebook-<team name>`
3. Clone your fork to your local machine
4. Install Node.js dependencies
```
npm install
```
```
npm install
```
5. Install an ESLint plugin for your editor. For example: [linter-eslint](https://github.com/AtomLinter/linter-eslint) for Atom.
6. Install MongoDB
```
brew tap mongodb/brew
brew install mongodb-community@4.2
```
```
brew tap mongodb/brew
brew install mongodb-community@4.4
```
7. Start MongoDB
```
brew services start mongodb-community@4.2
```
```
brew services start mongodb-community@4.4
```

### Start

1. Start the server
```
npm start
```
```
npm start
```
2. Browse to [http://localhost:3000](http://localhost:3000)

### Test

* Run all tests
```
npm test
```
* Run a check
```bash
npm run lint # linter only
npm run test:unit # unit tests only
npm run test:integration # integration tests only
```
- Run all tests
```
npm test
```
- Run a check
```bash
npm run lint # linter only
npm run test:unit # unit tests only
npm run test:integration # integration tests only
```

#### Start test server

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.

## MongoDB Connection Errors?

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`
* Try swapping `localhost`, everywhere that it appears in your codebase, with `127.0.0.1`. It might be surprising but this does sometimes make a difference.
- Check that MongoDB is installed using `mongo --version`
- Check that it's running using `brew services list`
- Try swapping `localhost`, everywhere that it appears in your codebase, with `127.0.0.1`. It might be surprising but this does sometimes make a difference.

If you have issues that are not resolved by these tips, please reach out to a coach and, once the issue is resolved, we can add a new tip!

0 comments on commit a20e4db

Please sign in to comment.