This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require 'fs' | |
{Transform} = require 'stream' | |
class Reverser extends Transform | |
_transform: (data, encoding, done) -> | |
@push data.toString().split('').reverse().join '' | |
done() | |
class UpperCaser extends Transform | |
_transform: (data, encoding, done) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.hello = function(name) { | |
console.log("Hello, " + name); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
var db = mongoose.connect('mongodb://localhost/mydb'); | |
var Schema = mongoose.Schema; | |
var Posts = new Schema({ | |
name : String, | |
subject: String, | |
comment : String, | |
password: String, | |
}); |