Closed thisroot closed 7 years ago
Hi i can't tune this package that it return headers. I make as wrote in a guide. But i use it with express, as wrote in Ethan's Brown book.
const apiOptions = { context: '', domain: require('domain').create() }; apiOptions.domain.on('error', function(err){ console.log('API domain error.\n', err.stack); setTimeout(function(){ console.log('Server shutting down after API domain error.'); process.exit(1); }, 5000); server.close(); let worker = require('cluster').worker; if(worker) worker.disconnect(); }); const rest = require('connect-rest').create(apiOptions); app.use(rest.processRequest()); ..... session_start_app: function (req, content, cb) { return cb( null,{ status: '201', message:"privet"}, { headers: { ETag: "10c24bc-4ab-457e1c1f" } } ); }
Good catch, thank you. See version @2.12.0 for a fix.
Hi i can't tune this package that it return headers. I make as wrote in a guide. But i use it with express, as wrote in Ethan's Brown book.