I am trying to run this piece of code taken from http://coffeescriptcookbook.com embedding it into an html.
net = require net
domain = localhost
port = 9001
connecting = (socket) ->
console.log "Connecting to real-time server"
connection = net.createConnection port, domain
connection.on connect , () ->
console.log "Opened connection to #{domain}:#{port}"
connecting connection
connection.on data , (data) ->
console.log "Received: #{data}"
connection.on end , (data) ->
console.log "Connection closed"
该法典有名客户。 coffe,一经咖啡指挥部管理:咖啡客户。 coffe, 进行罚款,与服务器连接,但当我在html的档案中加以利用并开启时,就会产生这一错误: 不详:没有界定要求。
My html script tags looks like this:
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"
type="text/javascript" charset="utf-8" ></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"
type="text/javascript" charset="utf-8"></script>
<script src="{% get_static_prefix %}functions.js"
type="text/javascript" charset="utf-8"></script>
<script src="{% get_static_prefix %}jquery.dajax.core.js"
type="text/javascript" charset="utf-8"></script>
<script src="{% get_static_prefix %}client.coffee"
type="text/coffeescript" charset="utf-8"></script>
任何想法?