Using node bin/www with twits
If you want to write production-ready code using node, then you should use node modules to divide your code into independent, maintainable modules. Even better, use a framework (Express). It provides "development" and "productions" options for the application and it also solves the trivial common issues for you, like setting up a router. You can also use an scaffolding tool, to generate a standard folder structure for your app.

For reading values from a config file, create a new module and store all the application wide configuration in it, instead of reading directly from a .json file.

Coming to onListening() function, it's not a good practice to hardcode url's. It's better to store them in a config module and require it when needed.