CoffeeScript examples in NodeJS?

As a pet project, I'm trying to get to know NodeJS and CoffeeScript, and it's hard for me to make the ball roll.

I found many examples of single-profile super-simple applications, for example, in the folder "CoffeeScript , however, none of them really shows how the full application will look. I also searched Google to no avail.

Do you have examples of medium and multi-file CoffeeScript / NodeJS applications that I could learn?

+69
coffeescript
Jan 03 2018-11-11T00:
source share
7 answers

See this meaning: https://gist.github.com/652819

This is mainly a NodeJS application that uses the Express framework, Redis for storing sessions, Couchdb as a database and written in CoffeeScript. However, you are asking for code organization. It depends on the developer and the developer. I personally prefer Express. However, if you prefer the MVC style, check out Geddy.

+33
Jan 03 2018-11-11T00:
source share

GitHub is your friend:

And if you want even more, look at the Coffee-Script Language list. I believe that 95% of the projects there are related to Node.js at the moment.

+16
Jan 04 2018-11-11T00:
source share

The Zappa framework is a coffeescript layer on top of Express, Socket.IO, and others. It is comprehensive enough and the examples may contain what you are looking for? https://github.com/mauricemach/zappa/

+6
Jan 03 2018-11-11T00:
source share

here is a github search, because everything is written in coffeescript and a description containing the word "node" - returning 300+ entries

https://github.com/search?langOverride=&language=CoffeeScript&q=node&repo=&start_value=1&type=Repositories&x=0&y=0

+4
Sep 20 '11 at 10:23
source share

By default, this will be the same as for an application with several medium-sized JavaScript / NodeJS files.

If you have source files named *.coffee and you would call the CoffeeScript compiler to create your JavaScript NodeJS application.

+3
Jan 03 2018-11-11T00:
source share

EDIT July 25, 2013

Sails.js recently added CoffeeScript support. This is a pretty good infrastructure and will make sense to Rails users right away: http://sailsjs.org/




My original answer follows:

Check out https://github.com/pheuter/brunch-socket-soup

Description: Brunch.io skeleton with socket.io function includes a coffeescript file

from README ...

Make sure Brunch.io is installed.

Prepare the bowl:

brunch new <your-project-name> -s github://pheuter/brunch-socket-soup

Throw the ingredients:

npm install

Serve and take a sip:

coffee server.coffee && brunch watch

+2
Apr 20 '13 at 5:56 on
source share

It is useful for me to study the existing node modules that were written in coffee-script , of which I am ALREADY familiar .

Run a quick search for installed (globally) node modules, for example ..

for x in $(echo $NODE_PATH | tr ':' '\n'); { [[ -d $x ]] && ls $x/**/*.coffee; }

On my system, I would look into the results (usually with the shortest paths, and which give modules that are more convenient for me), for example

/usr/local/lib/node_modules/ghfm/src/index.coffee

or

/usr/local/lib/node_modules/ipaddr.js/src/ipaddr.coffee

0
Oct. 15 '15 at 5:34
source share



All Articles