Re:How to write a command line application in Node.js
by stock_toaster on Friday August 09, 2013 @07:51PM
(#6189338)
I often see this argument presented for just about any server side js. I often wonder about actual real world reuse though.
[ Parent
| on HN ]
Re:How to write a command line application in Node.js
by akbar501 on Saturday August 10, 2013 @01:58AM
(#6190215)
I actually reuse the same code a lot, which is a very nice feature once you get used to it.
I share code between the client and server. For example, I have data type checks where I reuse the same library and the same application specific code on both the client and server.
I expose substantial portions of my server-side code via the command line. I also frequently call shell scripts from node as there are certain things I find easier to write in a shell script.
That said, I don't know if this amount of reuse is typical. And, code reuse is clearly not the only consideration.
Re:How to write a command line application in Node.js
by daleharvey on Friday August 09, 2013 @09:16PM
(#6189648)
Look at the top 2 depended on modules modules in the entire of the server side node.js ecosystem and guess what they were written for - https://npmjs.org/
I wrote a database specifically for web browsers and someone case along and write a relatively small pull request and it now works in node / on the server / with a http api - http://pouchdb.com