【发布时间】:2011-09-14 13:27:03
【问题描述】:
我有一个server.js,有很多功能。
app.post '/record2', (req,res) ->
app.post '/record', (req,res) ->
app.post '/incoming', (req,res) ->
app.post '/call', (req,res) ->
etc..
它开始变得非常混乱。使 server.js 更简洁、更易于理解的最佳方法是什么?
谢谢
【问题讨论】:
-
函数不会使代码混乱。只有它们里面的代码。
标签: javascript node.js coffeescript