Iron Router Server Side Routing callback doesn't work
问题 I am newer for IronRouter, why readFile callback executed the response are send to client. Router.map( ()-> this.route 'readFile', path: '/readFile' where: 'server' method: 'GET' action: ()-> self = this fs.readFile '/tmp/a.txt', (err, data)-> if err throw err console.log(data.toString()) self.response.writeHead(200, {'Content-Type': 'text/plain'}) self.response.end(data) console.log('response ...') ) http.js:733 W2049-12:04:26.781(8)? (STDERR) throw new Error('Can\'t render headers after