-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to support logging (console.log) statement in microcule example java script index.js file? #3
Comments
What operating system on you on? Is it Windows? Also, what is your The default behavior for It's also possible to easily override this logging behavior with your own custom logging middleware. How are you starting the |
Hi, Yes i am using windows 10 OS with npm-5.6.0, microcule-6.0.0,node-v8.11.1. I tried both way to start microcule first npm start and second direct index file run like microcule ./index.js index.jsmodule['exports'] = function calculateSal(req, res) { Here just one sample am trying with calculate total salary with post json request using postman Request: POST- content-type:(application/json) Response in postman in Text format 1.These first two logger i want to print in console.we can print this in console? |
Same task am discussing in microcule so closing this task.stackvana/microcule#46 |
I am not able to find the log statement added with console.log() in microcule java script example index,js.In Microcule any Js example index.js file am adding console.log() ,but that log statement is not displaying in my command prompt.If i use res.write('') that logs displaying in browser,any possibilities to support logging statement using console.log that will display in console not browser?
Index.js
module['exports'] = function helloWorld (req,res) {
//req is a Node.js http.IncomingMessage
var host = req.host;
console.log("host is",host); //Not working
res.end('hello world');
};
The text was updated successfully, but these errors were encountered: