snd/mohair — pull request #20 by eagleChina (2013-01-07 06:37:03+00:00)
Title: Develop

mohair = require 'mohair'
mysql = require 'mysql'

data =
name: 'test'
create: '2012'
conn = mysql.createConnection
host: 'localhost'
database: 'test'
user: 'root'
password: '123456'
conn.connect

mohair
.connect(conn)
.table('test')
.insert(data)
.exec (err, result) ->
console.log result