首页 > 代码库 > node-express

node-express

一:参考资料

  • express中文网:http://www.expressjs.com.cn/4x/api.html
  • socket:https://socket.io/docs/#sending-and-getting-data-(acknowledgements)

二:模板

  •   swig模板
    •   npm install swig --save
    •   

      var app = express();
      var swig = require(‘swig‘);
      
      // view engine setup
      app.set("view engine","html");// 指定模板文件的后缀名为html
      app.engine("html",swig.renderFile);// 运行swig模块

       

node-express