Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Additional formatting fixes
  • Loading branch information
jessewashburn authored Nov 15, 2024
1 parent 4f0c755 commit 14d3181
Showing 1 changed file with 38 additions and 36 deletions.
74 changes: 38 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,77 +32,81 @@ curl https://gist.githubusercontent.com/xyb994/0d14dfe302df0df0d4e8d8df0d1d5feb/

Start the containers:
```
docker compose -f planet-dev.yml -p planet-dev up -d
docker compose -f planet-dev.yml -p planet-dev up -d
```

Verify container status:
Run ```docker ps -a``` after a minute. You should see two containers running: chatapi and couchdb. The db-init container should have exited.

Configure CORS for CouchDB:
```git clone https://github.com/pouchdb/add-cors-to-couchdb.git
cd add-cors-to-couchdb
npm install
while ! curl -X GET http://127.0.0.1:2200/_all_dbs ; do sleep 1; done
node bin.js http://localhost:2200
```
git clone https://github.com/pouchdb/add-cors-to-couchdb.git
cd add-cors-to-couchdb
npm install
while ! curl -X GET http://127.0.0.1:2200/_all_dbs ; do sleep 1; done
node bin.js http://localhost:2200
```

Clone and configure the Planet project:
```
git clone https://github.com/open-learning-exchange/planet.git
cd planet
chmod +x couchdb-setup.sh
bash couchdb-setup.sh -p 2200 -i
git clone https://github.com/open-learning-exchange/planet.git
cd planet
chmod +x couchdb-setup.sh
bash couchdb-setup.sh -p 2200 -i
```

Install dependencies and serve the app:
```
npm install
ng serve
npm install
ng serve
```

Visit localhost:3000 to access the Planet app.
If port 3000 is in use, try ```ng serve --port 3001```

## Project Guidelines

Check out the project page for tasks.
Review the style guide.
Clone the repository to collaborate from a shared branch.
Run npm run install-hooks after cloning to add Git hooks.
Report issues, especially with specific frontend components.
Create a new branch with a descriptive name to work on issues.
Wait for two positive reviews before merging into master.
* Check out the project page for tasks.
* Review the style guide.
* Clone the repository to collaborate from a shared branch.
* Run npm run install-hooks after cloning to add Git hooks.
* Report issues, especially with specific frontend components.
* Create a new branch with a descriptive name to work on issues.
*W ait for two positive reviews before merging into master.

## Unit & End-to-End Tests

You can run tests directly from the host or within the development container.

Unit Tests:
```
npm run test
Unit Tests:
```
npm run test
```
End-to-End Tests:
```
npm run e2e
npm run e2e
````
## Additional Commands
```
Run: ng serve
Build: ng build
Lint: ng lint
Fix Lint: ng lint --fix
Run: ng serve
Build: ng build
Lint: ng lint
Fix Lint: ng lint --fix
```
To serve the app in a different language, use the LNG variable:
```
LNG=es npm start
```
## Troubleshooting
### I switched branches and now I'm missing a dependency...
Run the following command to reinstall dependencies:
```
npm install
```
If issues persist, delete and reinstall dependencies:
```
rm -rf node_modules/*
Expand All @@ -120,14 +124,12 @@ Run the CouchDB setup script:
Reinstall packages:
```
rm -rf node_modules/*
rm package-lock.json
npm install
rm -rf node_modules/*
rm package-lock.json
npm install
```
Restart the app:
```
ng serve
ng serve
```
This project is tested with [BrowserStack](https://www.browserstack.com/).

0 comments on commit 14d3181

Please sign in to comment.