Permalink
Browse files

[docs] Updating README

  • Loading branch information...
1 parent 0d16ea1 commit 8c6b1cfef4afebe575f58be344e705784c92d8cb @Marak Marak committed Jul 18, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 README.md
View
@@ -45,15 +45,15 @@ Here is a code example of using socketful as a stand-alone server: <a href="http
server.on(resource, action, payload, callback);
```
-Example:
+**Example:**
```js
socket.emit('creature', 'create', { id: 'bob' } , function(err, bob) {
console.log('created: ', bob);
};
```
- Socket Event Action
+ Socket.io Event Action
socket.emit('creature', 'create', data, callback) => Creature.create()
socket.emit('creature', 'get', data, callback) => Creature.get()
@@ -62,7 +62,7 @@ socket.emit('creature', 'create', { id: 'bob' } , function(err, bob) {
socket.emit('creature', 'destroy', data, callback) => Creature.destroy()
- The socket server will delegate all incoming Creature events to the resource and respond back with the appropriate result.
+ The socket server will delegate all incoming `Creature` events to the resource and respond back with the appropriate result.
## Relational Resources
@@ -101,8 +101,9 @@ Creature.feed.remote = true
It's easy as that! By setting the `feed` method to remote, the following events will exist in the `socket.io` server.
- socket.emit('creature', 'feed', data, callback) => Creature.feed()
-
+```js
+socket.emit('creature', 'feed', data, callback) => Creature.feed()
+```
## Resource Security

0 comments on commit 8c6b1cf

Please sign in to comment.