Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created August 30, 2016 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/e97dbfaacf876644002f46230f5ad7be to your computer and use it in GitHub Desktop.
Save chuck0523/e97dbfaacf876644002f46230f5ad7be to your computer and use it in GitHub Desktop.
r = require('rethinkdb')
r.connect({host: 'localhost', port: 28015}, (err, conn) => {
if(err) throw err
r.db('test').tableCraete('tv_shows').run(conn, (err, res) => {
if(err) throw err
console.log(res)
r.table('tv_shows').insert({name: 'Star Wars'}).run(conn, (err, res) => {
if(err) throw err
console.log(res)
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment