Git Product home page Git Product logo

node-datastore-server's Introduction

=====================================================================
NODE DATASTORE SERVER
---------------------------------------------------------------------

This is a simple, minimal Node.js server demonstrating communication
between the BodyTrack Grapher and the BodyTrack Datastore.  Not 
intended for use in production.

The BodyTrack Datastore repository is at:

   https://github.com/BodyTrack/datastore

The BodyTrack Grapher repository is at:

   https://github.com/BodyTrack/Grapher

This project includes binaries for the Grapher, but you'll need to
fetch and build the Datastore--see instructions below.

=====================================================================
INSTALLATION AND SETUP
---------------------------------------------------------------------

Here's what to do to get the server running:

1) Fetch the BodyTrack Datastore:

      git clone https://github.com/BodyTrack/datastore.git

2) Follow the build and install instructions for the BodyTrack
   Datastore, but install it into this project's "datastore"
   directory.  This project's "datastore" directory should be
   the parent to the "datastore" and "db" subdirectories.

3) Install Node.js (http://nodejs.org/)

4) Open a terminal window and cd to this project's root directory

5) Install the dependences:

      npm install

6) Optionally install nodemon (https://github.com/remy/nodemon)

      npm install -g nodemon

7) Start the server:

      node app.js

   Or, if you installed nodemon, start it with:

      nodemon app.js

8) Open a brower and go to:

      http://localhost:3000/

You should see the server's home page with a message that the
datastore is empty.  See the "Uplaoding Data" section below for a
few different ways to get data in to the datastore.

=====================================================================
UPLOADING DATA
---------------------------------------------------------------------

This server supports uploading of new data.  Here are a few ways
to get data in:

1) For a quick test with some sample Speck data, find the db.tgz
   tarball in this project's etc directory and untar it into the
   datastore directory. OK, fine...so this isn't *uploading*, but it
   gets data in there so stop complaining.  :-)

2) To upload using curl, make sure the server is running, open a
   terminal with the current directory set to this project's root,
   and run the following:

      curl -H "Content-Type:application/json" http://localhost:3000/api/bodytrack/jupload?dev_nickname=Speck -d @etc/speck_data.json

   Doing that will get you the exact same data as what's in the
   db.tgz mentioned above.

3) If you're using the Speck Gateway (http://specksensor.org/),
   simply point the uploader at localhost:3000.  This server doesn't
   support multiple users (all data is stored under user ID 1), so
   the username and password required by uploader are ignored--set
   them to whatever you want.

=====================================================================
DISCLAIMER
---------------------------------------------------------------------

This is my first time writing code for Node.js.  I probably did a lot
of things wrong and/or in a stupid way.  Feedback welcome.  Thanks.

=====================================================================

node-datastore-server's People

Contributors

chrisbartley avatar hhua avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.