Electron to host local webserver with IPC communication


Can an electron app host a local webpage including IPC communication? Instead of creating a new window and supplying an html file, can we host this same file to be accessible at a localhost url and have it communicate with the main process?