Skip to content

Commit bb231b0

Browse files
committed
Updated README
1 parent 1f72f0b commit bb231b0

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

README.md

+47-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,54 @@ This is the Strophe.js XMPP Chat Application for OS.js v3
1515

1616
## Installation
1717

18-
Set up a [punjab](https://github.com/twonds/punjab) server and simply configure this application to connect to the BOSH endpoint.
19-
20-
*If anyone knows of an actually working BOSH server on Node, let me know!*
21-
2218
```bash
2319
npm install --save --production @osjs/strophejs-application
2420
npm run package:discover
2521
```
22+
23+
## Usage
24+
25+
This application connects to a standard XMPP server using BOSCH.
26+
27+
### Using external servers
28+
29+
Set up a [punjab](https://github.com/twonds/punjab) server and simply configure this application to connect to the BOSH endpoint.
30+
31+
```
32+
Host: http://my-punjab-server/http-bind
33+
34+
Password: abc123
35+
```
36+
37+
### Custom BOSCH Server using Prosody
38+
39+
If you use Docker, you can simply add [Prosody](https://prosody.im/) to your docker-compose file:
40+
41+
> **NOTE: You have to copy the default prosody configuration into `src/etc/prosody` first. Then enable the BOSCH http server module.**
42+
43+
> NOTE: A domain name or hostname resolved via DNS is recommended (`my-domain.com` in this example)
44+
45+
```
46+
services:
47+
prosody:
48+
image: prosody/prosody
49+
ports:
50+
- "5280:5280"
51+
volumes:
52+
- "./logs/prosody:/var/log/prosody"
53+
- "./src/prosody/etc:/etc/prosody"
54+
```
55+
56+
You can now add users via the docker container with:
57+
58+
```
59+
docker-compose exec prosody prosodyctl adduser [email protected]
60+
```
61+
62+
Then in the OS.js application:
63+
64+
```
65+
Host: http://my-domain.com/http-bind
66+
67+
Password: abc123
68+
```

0 commit comments

Comments
 (0)