Tuesday, 6 August 2013

Strange JavaScript syntax in NodeJS examples

Strange JavaScript syntax in NodeJS examples

I've seen some NodeJS code examples on a couple of tech-blog sites with
strange syntax. Have I been living under a rock or is this just the Syntax
Highlighter playing silly buggers?
Example:
module.exports = (app) ->
app.get '/', (req, res) ->
res.send('hello world')
I presume the fact that this is an Express app is academic. Be gentle with
your answers...

No comments:

Post a Comment