Commit 4c6dacf2 authored by Tomas Vik's avatar Tomas Vik

Merge branch 'local-setup-readme' into 'master'

Instructions on how to connect the desktop app to the local webapp.

See merge request !216
parents f9e74fba adc6fdfd
......@@ -37,13 +37,23 @@ You can track https://gitlab.com/gitlab-org/gitter/desktop/issues/216 for poppin
The Gitter Desktop client is written using [NW.js](http://nwjs.io/), but the only prerequisite is [node.js](http://nodejs.org/download) for your platform and npm 3+.
1. Clone this repo: `git clone git@gitlab.com:gitlab-org/gitter/desktop.git && cd desktop`
1. Install all dependencies: `npm install`
1. Generate your own [app oAuth credentials](https://developer.gitter.im/apps) where the redirect url is `https://gitter.im/login/desktop/callback`
1. Start the app with your credentials:
- macOS/Linux: `OAUTH_KEY=yourkey OAUTH_SECRET=yoursecret npm start`
- Windows cmd: `set OAUTH_KEY=yourkey&& set OAUTH_SECRET=yoursecret&& npm start`
- Alternatively, you can create an `oauth.json` file in the `nwapp/` folder. Place your keys and secrets in this file like this example, where `"osx"` represents your platform as defined [here](nwapp/utils/client-type.js): `{ "osx": { "KEY": "yourkey", "SECRET": "yoursecret" }}`. Once done, run `npm start`
1. Clone this repo: `git clone git@gitlab.com:gitlab-org/gitter/desktop.git && cd desktop`
1. Install all dependencies: `npm install`
1. Generate your own [app oAuth credentials](https://developer.gitter.im/apps) where the redirect url is `https://gitter.im/login/desktop/callback`
1. Start the app with your credentials:
- Create an `oauth.json` file in the `nwapp/` folder. Place your keys and secrets in this file like this example, where `"osx"` represents your platform as defined [here](nwapp/utils/client-type.js): `{ "osx": { "KEY": "yourkey", "SECRET": "yoursecret" }}`. Once done, run `npm start`
- alternative on macOS/Linux: `OAUTH_KEY=yourkey OAUTH_SECRET=yoursecret npm start`
- alternative on Windows cmd: `set OAUTH_KEY=yourkey&& set OAUTH_SECRET=yoursecret&& npm start`
### Run against your local development Gitter `webapp`
*Note: By default, the app runs against production, `https://gitter.im`*
1. Have [webapp](https://gitlab.com/gitlab-org/gitter/webapp) and [developer-gitter-im](https://gitlab.com/gitlab-org/gitter/developer-gitter-im) working locally
1. Generate OAuth credentials in the [local developer.gitter.im](http://localhost:4001/apps) and specify `http://localhost:5000/login/desktop/callback` as redirect URL (`desktop` in URL path is arbitrary and can be anything like `desktop-dev`)
1. Add the credentials to `nwapp/oauth.json` (see previous section)
1. Start the app `npm start -- --base-url=http://localhost:5000 --faye-url=http://localhost:5000/bayeux`
-
### CLI parameters
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment