Added url checking + minor changes

- Checking the url validity
- Handling env variables
- Print a message when starting server
- Handling error in server.listen