Skip to content

Commit a561871

Browse files
author
pemrouz
committed
doc: remove express boilerplate
1 parent 1166d6d commit a561871

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ On the server:
44

55
**`index.js`**
66
```js
7-
const app = require('express')()
8-
, server = app.listen(3000)
9-
, ripple = require('rijs')({ server })
10-
11-
app.get('/*', (req, res) => res.sendFile(__dirname+'/index.html'))
7+
const ripple = require('rijs')({ dir: __dirname })
128
```
139

1410
On the client:
1511

16-
**`index.html`**
12+
**`pages/index.html`**
1713
```html
1814
<script src="/ripple.js"></script>
1915
```
@@ -24,10 +20,14 @@ Run it:
2420
$ node index.js
2521
```
2622

27-
That's it! **No boilerplate necessary, no build pipeline, no transpilation, no special CLI.**
23+
This starts up a server on a random port and statically serves your `/pages` directory. You can also specify a `port` to always use, or pass an existing HTTP `server` (e.g. from express).
2824

2925
Clients will then just be streamed the fine-grained resources they are using (i.e. everything is lazy loaded, no bundling, no over-fetching).
3026

27+
Ripple keeps clients/servers in sync by replicating an immutable log of actions in the background, and subsequently the view - or other modules - which are reactively updated when the local store is updated.
28+
29+
That's it! No boilerplate necessary, no build pipeline, no special transpilation, no magical CLI.
30+
3131
&nbsp;
3232
## Components
3333

0 commit comments

Comments
 (0)