teemserver

1.1.0 • Public • Published

Teem Server

Prerequisites

Install Node.js v0.10.x

Next, be sure to run this inside the server directory:

npm install

If your machine doesn't have 'xmllint' available on the command-line, you'll need to install it. On Windows, a version of xmllint_windows is checked in (a small .NET application). This is based upon xmllint for windows.

For best results, create a projects directory in the same location as your server and dreem directories. The projects directory is intended to give you a place to work that is independent of dreem.

Running the tests

Be sure mocha is installed on your environment:

npm install -g mocha

Then in the root directory, run the tests with:

mocha

Starting the server

The Teem Server can be started either with node server.js or using the ./bin/teemserver script, both of which accept environment variables for configuration, as follows:

DREEM_ROOT specifies the root to your local Dreem installation:

DREEM_ROOT=../dreem/ node server.js

The optional DEBUG flag shows event bus information in the shell:

DEBUG=true DREEM_ROOT=../dreem/ ./bin/teemserver

The optional DREEM_PROJECTS_ROOT flag will mount a projects directory at the root, e.g. http://localhost:8080/projects/':

DREEM_PROJECTS_ROOT=../projects/ DREEM_ROOT=../dreem/ ./bin/teemserver

If you have external components to load, place them all in a top-level directory and use the DREEM_COMPONENTS_ROOT variable to indicate where to find them:

DREEM_COMPONENTS_ROOT="../workspace/components" ./bin/teemserver

Optional API keys that enable access to Rovi APIs

ROVI_SEARCH_SECRET=XXX ROVI_SEARCH_KEY=XXX DREEM_ROOT=../dreem/ ./bin/teemserver

To use Rovi APIs, prepend /api/ to the URL, e.g.

Top movies Top movie Pivot to actor Pivot to other film

See the Rovi docs for more info.

Windows users

Install Node.js and run the application Node.js -> Node.js command prompt

Set the environment variables before running the server.

set DEBUG=true
set DREEM_ROOT=../dreem/
node server.js

Running demos

Once your server is running, the directory specified by DREEM_ROOT is served from the root URL, e.g. http://localhost:8080/examples/timeline.html. If you specified a project root, you should be able to run your examples from http://localhost:8080/projects/. Note that the server will not list the contents of directories, so you'll need to point to a specific html file, e.g. http://localhost:8080/examples/timeline.html

Running all smoke tests from one URL

You can run http://localhost:8080/smokerun to in a browser to run all smoketests one after the other without manual intervention, all errors are reported on the server commandline and not just the browser console.

Troubleshooting

On OSX, if you see issues running 'npm install' that say something like 'Failed at the pty.js@0.2.3 install script' try running this on the command line:

xcode-select --install

Readme

Keywords

Package Sidebar

Install

npm i teemserver

Weekly Downloads

4

Version

1.1.0

License

MIT

Last publish

Collaborators

  • teem