Main directive logic to listen and register
Basic sample working under NodeJS web-server