zoukankan      html  css  js  c++  java
  • Express在windows IIS上部署详解

    最近公司在用Express+angularjs+wcf开发系统,让我在windows上部署系统,遇到不少问题,不过最后还是解决了,在IIS上部署系统,

    首先windows需安装以下软件:

    1.nodejs;

    2.iisnode;

    3.rewrite;

    安装这三个软件后,之后部署和部署asp.net程序一样,这里就不多说了;

    不过要在根目录下要价格配置文件:web.config;

    <configuration>
    
      <system.webServer>
        <!-- indicates that the hello.js file is a node.js application 
        to be handled by the iisnode module -->
        <handlers>
          <add name="iisnode" path="index.js" verb="*" modules="iisnode"/>
        </handlers>
        <!-- use URL rewriting to redirect the entire branch of the URL namespace
        to hello.js node.js application; for example, the following URLs will 
        all be handled by hello.js:
        
            http://localhost/node/express/myapp/foo
            http://localhost/node/express/myapp/bar
            
        -->
        <rewrite>
          <rules>
            <rule name="***">
              <match url="/*"/>
              <action type="Rewrite" url="index.js"/>
            </rule>
          </rules>
        </rewrite>
        <iisnode loggingEnabled="false" logDirectory="iisnode" devErrorsEnabled="false" nodeProcessCommandLine=""%programfiles%
    odejs
    ode.exe"" interceptor=""%programfiles%iisnodeinterceptor.js""/>
      </system.webServer>
    
      <system.web>
        <compilation debug="true"/>
      </system.web>
    
    </configuration>
    

      里面的url可以为你的启动文件app.js,这里index我们直接用的www文件改为了index.js,丢到了根目录下。

    软件iisnode的版本:iisnode-full-v0.2.11-x86.msi。

  • 相关阅读:
    高精准加法和乘法
    高精度加法
    病毒!!!!
    真真真·高精度乘法!!!!!
    急训 Day 1 (2)
    UVA Open Credit System Uva 11078
    SPOJ 375 Query on a tree 树链剖分模板
    安卓数据包的传递 Bundle
    Android studio 如何在Activity之间传递简单的数据
    java关系运算中的控制和使用
  • 原文地址:https://www.cnblogs.com/bobo-show/p/5002790.html
Copyright © 2011-2022 走看看