Can I use CoffeeScript instead of JS for node.js?
问题 What are my restrictions if I want to code node.js and use CoffeeScript? Can I do anything I'd be able to do in JS? 回答1: Yes, CoffeeScript simply compiles into pure JS, making it completely compatible with node.js. To run CoffeeScripts on node, you can either: Type coffee -c example.coffee to compile, followed by node example.js to run the compiled JS. Simply type coffee example.coffee 回答2: Not only can you run CoffeeScript files directly in Node with coffee source.coffee you can also require