I am writing a NodeJs application. I need to secure(https) only the login page. Home page should be non-secure(http).
If my domain is www.example.com,
If a http://www.example.com request come it should be redirect to https://www.example.com (secure https)
After user successfully login to the system it should go to the http://www.example.com/home url. not the https://www.example.com/home
When user login out it should be redirect to https://www.example.com (secure https)
Please give me some help for achieve this. or If you have come a cross this king of live situation please let me know.