zoukankan      html  css  js  c++  java
  • wind7 64 setup appjs

    新买了台笔记本,新安装了系统,,就测试下安装 appjs

    1。安装 python 2.7x 版本

    2.npm install node-gyp -g

    3.设置环境变量

    NODE_PATH

      C:\Users\Administrator\node_modules;

    4.npm install appjs

    5.设置环境变量

    PATH

      C:\Users\Administrator\node_modules\appjs\deps\cef\Release;

    6.RUN

      node test.js

    var appjs = require('appjs');
    
    var window;
    
    // Initialize appjs.
    var app = appjs.init();
    
    // Called when page load finishes.
    app.on("ready",function(){
        console.log("Event Ready called");
    
        // Runs a script in browser context.
        window.runInBrowser(function(){
            var body = document.body;
            body.style.color="#f60";
        });
    
      // Show created window ( see below )
      window.show();
    });
    
    // Routing:
    
    // you can use a static router:
    // app.use(app.staticRouter('./public'));
    
    // or you can handle requests manually:
    app.get("/",function(req,res,next){
      res.send("\
        <html>\
            <head><title>Hello World</title></head>\
            <body>Hello World</body>\
        </html>\
      ")
    });
    
    // Creates a new window. Its invisible until window.show() get called.
    // http://appjs/ is a special url. It is home for your application!
    window = app.createWindow("http://appjs/",{autoResize:false});
  • 相关阅读:
    [笔记] 什么是欠采样?
    [笔记] Frequncy Divider
    [笔记] SDRAM读写控制
    能力去激活
    一个实用的SQL
    有用的SQL 语句(不断更新)
    javascript 与服务器端交互的一个小问题
    Javascript 验证码
    几个文本编辑器
    ASP.NET验证码(3种)
  • 原文地址:https://www.cnblogs.com/solq/p/2560226.html
Copyright © 2011-2022 走看看