Home » Nodejs » Coffeescript mode for node console?

Coffeescript mode for node console?

Posted by: admin November 29, 2017 Leave a comment

Questions:

I’m wondering if there’s any easy way to have an interactive node.js console session do on-the-fly interpretation of commands using coffeescript’s syntax.

Answers:

Assuming you have node.js installed and npm[1], install CoffeeScript with this command:

> npm install -g coffee-script

Then in your terminal, type:

> coffee

You will have a node.js-like console, but with CoffeeScript syntax.

[1] To install node.js, download a binary from here: http://nodejs.org/#download

Questions:
Answers:

Just try to type

coffee

in the shell

For installation

  1. Install Node.js First (NPM included)

  2. sudo npm install -g coffee-script