Suppose you have a virgin OPML Editor installation and want to make it so that requests that come in on port 80 are handled by mainResponder. This is what you have to do.
1. user.opmlEditor.prefs.flServerOnPort80 = true
2. user.webserver.responders.mainResponderOnPort80 = @opmlServer.data.responder
3. user.inetd.config.http3 = opmlserver.data.daemon
4. user.webserver.responders.websiteframework.enabled = false
5. If you’re on a Mac:
- user.inetd.config.http3.port = 5338
- opmlServer.macPortForward (80, 5338)
- opmlServer.macPortForward (5337, 5338)
Now your OPML Editor is going to take requests on port 80 and those requests are going to be handled by mainResponder.respond. However, if you want the same behavior as the websiteFramework responder you have to make one more change.
6. config.mainresponder.domains.default = @user.webserver.responders.websiteFramework.data.doctree
Now all your Tools websites will be accessible at: http://127.0.0.1/hello/ where your tool is named hello.root.
Note: I do this more for myself than anything else. I end up forgetting how I did something like this, and when I boot up a new computer with a virgin installation of the OPML Editor I’m left scratching my head how to get the server working properly. Now I can do a search to find this, and it’s easy the next time.
Posted by Frontier News – Der Schockwellenreiter on May 10, 2010 at 10:17 am
[...] mainResponder erfolgreich mit seinem OPML Editor verbandelt und ein How-To dazu veröffentlicht: Running mainResponder on port 80 in the OPML Editor. [Ders. in der [...]
Posted by Stephen Waters on November 4, 2010 at 5:18 pm
Is:
3. user.inetd.config.http3 = opmlserver.data.daemon
supposed to be:
3. user.inetd.config.http3.daemon = opmlserver.data.daemon
– Should it be an address
and
– Should it be @opmlserver.data.daemon
and 5. – Should these be executed as quick scripts?
opmlServer.macPortForward (80, 5338)
opmlServer.macPortForward (5337, 5338)
– and do they ever have to be re-executed?
Thanks.
Stephen
Posted by Dave Winer on January 2, 2011 at 1:13 am
Re the first concern, I’m pretty sure it’s correct as-written.
Re the second one, yes you should run them in the Quick Script window, or cmd-/ them in the outliner.
I don’t believe they need to be re-executed.