Skip to content

Commit b899c49

Browse files
committed
Update README some more
1 parent 5402463 commit b899c49

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ micro-analytics
2121

2222
That's it, the analytics server is now running at `localhost:3000`! 🎉
2323

24-
See [`server-setup.md`](./server-setup.md) for instructions on acquiring a server and setting up `nginx` to make your `micro-analytics` publicly available.
24+
To deploy a server either refer to [`server-setup.md`](./server-setup.md) for instructions on manually acquiring and setting up a server or use [`now`](https://now.sh) and deploy with a single command:
2525

26-
> **Note**: You can pass any option to the `micro-analytics` command that you can pass to [`micro`](https://github.com/zeit/micro). As an example, to change the host you'd do `micro-analytics -H 127.0.0.1`
26+
```
27+
$ now micro-analytics/micro-analytics-cli
28+
29+
> Deployment complete! https://micro-analytics-asfdasdf.now.sh
30+
```
2731

2832
## Usage
2933

@@ -80,41 +84,43 @@ These are the available database adapters, made by the community:
8084

8185
- [`micro-analytics-adapter-redis`](https://github.com/relekang/micro-analytics-adapter-redis)
8286

83-
Don't see your favorite database here? Writing your own adapter is super easy! See [`writing-adapters.md`](writing-adapters.md) for a simple step-by-step guide.
87+
Don't see your favorite database here? Writing your own adapter is pretty easy, we've even written the tests for you! See [`writing-adapters.md`](writing-adapters.md) for a guide on how to write an adapter for your database of choice.
8488

8589
### Live updates
8690

87-
micro-analytics also let's you listen into updates live with [server-sent events][].
91+
micro-analytics let's you listen into updates live with [server-sent events][].
8892
That means you can e.g. build a realtime dashboard for your analytics!
8993

9094
Note: Make sure your database adapter supports this feature. If not, bug them to implement it!
9195
micro-analytics will tell you when it starts up if it is supported, so the easiest way to find
92-
out is just to start it up.
96+
out is to start it up.
9397

9498
The example below shows how you can listen for events in the browser, just swap
95-
micro-analytics.now.sh with your own domain and give it a try.
99+
`my-deploy.now.sh` with your own domain and give it a try:
96100

97101
```es6
98-
const sse = new EventSource('https://micro-analytics.now.sh/realtime')
102+
const sse = new EventSource('https://my-deploy.now.sh/realtime')
99103
sse.onopen = function () { console.log('[sse] open') }
100104
sse.onerror = function (error) { console.error('[sse error]', error) }
101105
sse.addEventListener('micro-analytics-ping', function (e) { console.log('[sse]', e) })
102106
```
103107

104108
#### Browser support
105109

106-
Server-sent events is not supported in all browsers. This can easily be fixed by using a polyfill.
107-
Take a look at [the caniuse table][] for server-sent events if you need one. Polyfills that are
108-
supported(disclaimer this list is from the documentation of the sse library we use [rexxars/sse-channel][]):
110+
Server-sent events are not supported in all browsers. There are great, tiny polyfills available, but before you include one take a look at [the caniuse table][] for server-sent events if you need one based on the browsers you support.
111+
112+
Polyfills that are supported:
109113

110114
* [amvtek/EventSource](https://github.com/amvtek/EventSource)
111115
* [Yaffle/EventSource)](https://github.com/Yaffle/EventSource)
112116
* [remy/polyfills/EventSource.js](https://github.com/remy/polyfills/blob/master/EventSource.js)
113117

118+
> Note: This list is from the documentation of the sse library we use [rexxars/sse-channel][], check that repo because it might have been updated.
119+
114120
[server-sent events]: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
115121
[the caniuse table]: http://caniuse.com/#feat=eventsource
116122
[rexxars/sse-channel]: https://github.com/rexxars/sse-channel
117123

118124
## License
119125

120-
Copyright ©️ 2017 Maximilian Stoiber, licensed under the MIT License. See [`license.md`](./license.md) for more information.
126+
Copyright ©️ 2017 Maximilian Stoiber & Rolf Erik Lekang, licensed under the MIT License. See [`license.md`](./license.md) for more information.

license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2017 Maximilian Stoiber
3+
Copyright (c) 2017 Maximilian Stoiber & Rolf Erik Lekang
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

0 commit comments

Comments
 (0)