Skip to main content

Posts

Showing posts from June, 2017

NodeJs Debugging options

Chrome browser supports great ways to debug, break points, watch and more the same way you do inspecting the browser javascript. 1. Fast Debugging:  User node --inspect  filename  (Devtool GUI) > node --inspect myserver.js This will give you a  link to a devtool session some thing looks like below  chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/cd33 a427-37a4-4d96-b3f6-13ed4cbc870f Server is listening on port: 2403  you just copy this and paste in a new tab in chrome browser , It opens up the devtool. ( this is only debugging window. It doesn't start your application) Now you open a browser window or what ever ways you want to access your application , make the first call. You can use F8 (Run) , F10 (skip) , F11 (step into) keys on Windows to step through the code. Note: Some times the devtool session hangs in the memory s...

YEOMAN in a nutshell - quick easy guide

Here are the KEY points you should know to quickly learn Yeoman Generator. 1. You need to know - Javascript and module export feature. 2. 'generator' - is unfortunately a KEYWO RD - which you should be using very unconventionally to your surprise. Here are the places you must use 'generator' keyword. Let us say your project name going to be - "myappcodegenerator", now, The app "Foder / Directory Name should HAVE the prefix : "generator-" . As per your example project the Folder name should be - "generator-myappcodegenerator" And inside this folder create a package.json (You can do it by 'npm init') You have to Edit package.json to change the value fo ' name: ' to " generator - myappcodegenerator' Then to keep it simple  create a folder -  'generators' . Inside ' generator-myappcodegenerator/generators' folder, you will put your code, the default executable file would be 'i...