Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Keesun Baik committed Jul 12, 2013
1 parent b74a0ac commit ec700cd
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Now, This module supports the latest version of the socket.io, 0.9.10.

## Name

The module name is `socket-io`.
The module name is `mod-socket-io`.

## Dependency

Expand All @@ -15,25 +15,32 @@ Add a maven repository contains `mod-socket-io`.

```groovy
repositories {
maven { url 'http://dev.springsprout.org/nexus/content/groups/public/' }
maven { url 'https://github.com/keesun/mvn-repo/raw/master' }
...
}
```
### Maven

```xml
<repositories>
<repository>
<id>springsprout</id>
<url>http://dev.springsprout.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<repository>
<id>my.mvn.repo</id>
<url>https://github.com/keesun/mvn-repo/raw/master</url>
</repository>
```


Add a dependency.

### Gradle
### Gradle (for the Vert.x 2.0.0-CR3)

```groovy
dependencies {
compile "com.nhncorp:mod-socket-io:1.0.0"
...
}
```

### Gradle (for the Vert.x 1.3.1.final)

```groovy
dependencies {
Expand All @@ -42,13 +49,23 @@ dependencies {
}
```

### Maven
### Maven (for the Vert.x 2.0.0-CR3)

```maven
<dependency>
<groupId>com.nhncorp</groupId>
<artifactId>mod-socket-io</artifactId>
<version>1.0.0</version>
</dependency>
```

### Maven (for the Vert.x 1.3.1.final)

```maven
<dependency>
<groupId>com.nhncorp</groupId>
<artifactId>mod-socket-io</artifactId>
<version>0.9.10</version>
<groupId>com.nhncorp</groupId>
<artifactId>mod-socket-io</artifactId>
<version>0.9.10</version>
</dependency>
```

Expand Down Expand Up @@ -159,11 +176,13 @@ And, after you put the module's jar file to you module's classpath. You can code

In the view, you can use the same socket.io javascript like:

```javascript
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('http://localhost:9090');
socket.on('news', function (data) {
console.log(data);
socket.emit('my other event', { my: 'data' });
});
</script>
</script>
```

0 comments on commit ec700cd

Please sign in to comment.