http://sugarjs.com/
It's a libary so I can load it in browser directly. It's also a npm package, but how can I use it as a moudule?
In browser, load a js file will change the objects easily, but is not the same while working in nodejs, and I can't figure it out.
You just install the module:
npm install sugar
then use it just like the API says:
var http = require('http');
var sugar = require('sugar');
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('hey_there_good-lookin'.camelize());
}).listen(process.env.PORT || 8080);
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