As a pet project, I am trying to get familiar with NodeJS and CoffeeScript, and am finding it hard to get the ball rolling.
I've found plenty of examples of single-file super-simple apps like in CoffeeScript's examples folder, however, none of those really show what a full application would look like. I've also scrounged Google to no avail.
Do you have any examples of medium-sized, multi-file CoffeeScript/NodeJS apps I could learn from?
In general, we use parenthesis while declaring the function, calling it, and also to separate the code blocks to avoid ambiguity. In CoffeeScript, there is no need to use parentheses, and while creating functions, we use an arrow mark (->) instead of parentheses as shown below.
CoffeeScript is a programming language that compiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python, and Haskell in an effort to enhance JavaScript's brevity and readability. Specific additional features include list comprehension and destructuring assignment.
The coffee and cake commands will first look in the current folder to see if CoffeeScript is installed locally, and use that version if so. This allows different versions of CoffeeScript to be installed globally and locally.
As of today, January 2020, CoffeeScript is completely dead on the market (though the GitHub repository is still kind of alive).
See this gist: https://gist.github.com/652819
Its pretty much an entire NodeJS app using the Express framework, Redis for session storage, Couchdb as the database and written in CoffeeScript. However, you are asking for code organization. That depends from developer to developer. I personally prefer Express. However if you prefer MVC style then see Geddy.
GitHub is your friend:
And if you want even more, take a look at the listing for the Coffee-Script Language. I suppose that 95% of the projects there are related to Node.js at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With