A instruction of how to install node.js keystone at windows 7 IIS as web application.
- Install mongodb as windows service.
- keystone.js is running on top of node.js, so you'll need to install node.js for windows.
- Now it's time to setup keystone web application run by node.js, go to the keystone home page and look throught their instruction or you can do as following.
- open command promt as Administrator and go to the folder where you want to add keystone.js
npm install -g generator-keystone
- type yo keystone
- above two command you'll setup your keystone.
- open node.js command promt and type
- If you can hit localhost:3000 then you're ready to setup keystone.js at IIS with IISnode.
- how to install IIS(IIS7 at Windows 10, Windows 8, Windows 7)
- windows + c, open Programs and features as command or go to control panel to open Programs and features.
- installed iisnode for iis 7/8 (x64)
- do a test to make sure iisnode installed correctly
- go to /Program Files/iisnode
- click setupsamples.bat, this batch file will tell you how to setup a sample website at IIS by using iisnode.
- Install URL Rewrite 2.0
- this is very important to use node.js, keystone.js at IIS. Following is working web.config you can reference.
<configuration> <system.webServer> <handlers> <add name="iisnode" path="keystone.js" verb="*" modules="iisnode" /> </handlers> <rewrite> <rules> <rule name="Catch All"> <match url="/*" /> <action type="Rewrite" url="keystone.js" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
- Now, you can setup IIS bindings, you can map your mydomain.com to this iis website.