Question: I currently have a basic website/web-server setup through Node.JS (source available at [github](http://github.com/dave911d/dashy)). I have a rethinkDB database running and that's all configured correctly.My main problem is figuring out how to write the output of terminal to RethinkDB. I figured the best way would be to `echo` the terminal output through a Cron job to a file. The main problem is how would I be able to load this file repetitively into the RethinkDB database to then display on the website?

Answer: 
If you have one document per line on stdin, you can just pipe `process.stdin` to a transform stream that would call `JSON.parse` and then you can pipe it to a table using rethinkdbdash.
You can [import JSON/CSV data](http://rethinkdb.com/docs/importing/) from the command line, so you could include this import command in your cron job. More elegant way would probably be to use the [External API access](http://rethinkdb.com/docs/external-api-access/)(if you are able to serve the terminal output via http).