Microsoft's Internet Information Server (IIS) is the built-in web server for Windows. It can be useful to host TiddlyWiki within IIS in order to take advantage of IIS features like URL rewriting, static file hosting and automatic restarts after a crash.
C:\MyStuff)C:\MyStuff\package.json with the content:{ "name": "MyStuff", "description": "A description of this wiki", "dependencies": { "sax": "1.2.4", "tiddlywiki": "*" } }
C:\MyStuff\web.config with the content:<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" /> </handlers> <httpPlatform stdoutLogEnabled="true" stdoutLogFile=".\node.log" startupTimeLimit="20" processPath="C:\Program Files\nodejs\node.exe" arguments=".\node_modules\tiddlywiki\tiddlywiki.js ./wiki --listen port=PORT path-prefix=/MyApp"> <environmentVariables> <environmentVariable name="PORT" value="%HTTP_PLATFORM_PORT%" /> <environmentVariable name="NODE_ENV" value="Production" /> </environmentVariables> </httpPlatform> </system.webServer> </configuration>
C:\MyStuff\wiki)C:\MyStuff\wiki\tiddlywiki.info with the content:{ "description": "My wiki", "plugins": [ "tiddlywiki/tiddlyweb", "tiddlywiki/filesystem" ], "themes": [ "tiddlywiki/vanilla", "tiddlywiki/snowwhite" ] }
C:\MyStuff\wiki\tiddlers)C:\MyStuff\wiki\tiddlers\config-tiddlyweb-host.tid with the content:title: $:/config/tiddlyweb/host text: $protocol$//$host$/MyApp/
npm install within the C:/MyStuff directoryinetmgr.exe)MyAppC:\MyStuffTest the app by visiting http://localhost/MyApp/ in a browser.
--listen command in web.config. For example:arguments=".\node_modules\tiddlywiki\tiddlywiki.js ./wiki-server --listen username=joe "password=bloggs" port=PORT path-prefix=/MyApp">"web.config file, or modify the app code, then you'll need to restart the server using the IIS manager application