…
|
||
---|---|---|
.. | ||
bin | ||
public | ||
routes | ||
views | ||
README.md | ||
app.js | ||
package.json |
README.md
Beacon API demo
This is a demo of the Beacon API using a basic Node.js server. Upon pageload, a script (beacon_demo.js) attempts to send some sample beacon data to the server.
The example data here is simply the timestamp of the send. The server will then receive the data and log the timestamp of reception and print it to the page.
Setup instructions
- If you don't already have it, install Node.js
- Download the code from this "beacon" folder locally.
- Open a console window and navigate to your beacon directory
- Install dependencies:
npm install
- Start the server
- on Windows:
set DEBUG=beacon;* & npm start
- on MacOS / Linux:
DEBUG=beacon ./bin/www
- Navigate your browser to http://localhost:3000