Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1816 from HospitalRun/env
Browse files Browse the repository at this point in the history
feat(env): adds hospitalrun server information
  • Loading branch information
matteovivona committed Feb 13, 2020
2 parents 6c9a018 + 80c3f1c commit e69de57
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_HOSPITALRUN_API=http://0.0.0.0:3001
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ Contributions are always welcome. Before contributing please read our [contribut
3. Install the dependencies: `yarn`
4. Run `yarn run start` to build and watch for code changes

## Connecting to HospitalRun Server

__Note: The following instructions are for connecting to HospitalRun Server during development and are not intended to be for production use. For production deployments, see the deployment instructions.__

1. Configure [HospitalRun Server](https://github.com/HospitalRun/hospitalrun-server)
2. Start the HospitalRun Development Server
3. Copy the `.env.example` file to `.env`
4. Change the `REACT_APP_HOSPITALRUN_API` variable to point to the HospitalRun Development Server.

## Working on an Issue

In order to optimize the workflow and to prevent multiple contributors working on the same issue without interactions, a contributor must ask to be assigned to an issue by one of the core team members: it's enough to ask it inside the specific issue.
Expand Down
15 changes: 6 additions & 9 deletions src/config/pouchdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ function createDb(name: string) {
}

const db = new PouchDB(name)
// db.sync(
// `https://a27fa3db-db4d-4456-8465-da953aee0f5b-bluemix:cd6f332d39f24d2b7cfc89d82f6836d46012ef3188698319b0d5fff177cb2ddc@a27fa3db-db4d-4456-8465-da953aee0f5b-bluemix.cloudantnosqldb.appdomain.cloud/${name}`,
// {
// live: true,
// retry: true,
// },
// ).on('change', (info) => {
// console.log(info)
// })
db.sync(`${process.env.REACT_APP_HOSPITALRUN_API}/_db/${name}`, {
live: true,
retry: true,
}).on('change', (info) => {
console.log(info)
})

return db
}
Expand Down

1 comment on commit e69de57

@vercel
Copy link

@vercel vercel bot commented on e69de57 Feb 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.