An Express wrapper for Square's Cube: A system for time series visualization.
This is an experimental project. Only a limited set of Cube's server functionality is ported.
- Websocket support
- UDP support
- Internal cube metrics
- Any of the static assets and features
Also, this projects depends on some trickery and modifications to Cube itself. Tread lightly.
Cube is an awesome project. Really awesome. But there's a tight coupling of "Cube, the library" and "Cube, the server". Many of the pull requests in the Cube project are actually server features, like authentication, logging, etc.
This project is an experiment to separate the server from the library, and does so in an extreme way.
- It uses Express
- Coffee compiled JavaScript. (Gasp!)
- Middleware for things like authentication and CORS.
- Easy to deploy to Heroku
Ideally, Cube can be modifed to use it as a pure library while retaining it's own server functionality. Someone could choose to integrate Cube however they'd like, or get started right away using the built in server.
Here's the good news. Getting started and deploying to your favorite PaaS is easy!
- Copy
.env.sampleto.env. Modify the contents to suit your config. - Be sure you modified your MongoDB setting in step 1.
- Install foreman. Foreman will load up
your ENV vars set in the
.env. You can use any process supervisor you'd like here. - Run
foreman start.
Want to deploy it to Heroku? Awesome.
- Create a project.
heroku apps:create <project-name> - Add the ENV you need.
heroku config:set MONGODB_URL=<your url> - Push!
git push heroku master - Make sure a web process is running.
heroku ps:scale web=1