Giter Site home page Giter Site logo

server's Introduction

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 [email protected] install script' try running this on the command line:

xcode-select --install

server's People

Contributors

gnovos avatar lorienhw avatar maynarddemmon avatar mcarlson avatar onejsdev avatar promanik avatar

Watchers

 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.