node-webkit

Node-webkit app- how to update it?

允我心安 提交于 2019-12-04 08:45:07
问题 I am using node-webkit to develop apps for my students, and to provide one stop solution I would need to update node-webkit archive once in a month. Is there a way I can accomplish that? Basically I need to replace just one html file every month, say "page1.html". I googled but have no idea where to start. 回答1: On Mac, you can access the filesystem of the own app e.g. $ ls -lh /Applications/Shock.app/Contents/Resources/app.nw/ [...] -rw-r--r-- 1 jordi staff 2,3K 29 gen 01:47 index.html -rw-r-

net::ERR_INSECURE_RESPONSE while making ajax request from node-webkit

强颜欢笑 提交于 2019-12-04 00:53:46
when I'm trying to make ajax request with jquery to: https://localhost:8443/uri I get this error: net::ERR_INSECURE_RESPONSE I'm using self signed certificate, in package.json I have these parameters: "chromium-args": "--ignore-certificate-errors --auth-schemes='basic --auth-server-whitelist='*localhost:8443' --auth-negotiate-delegate-whitelist='*localhost:8443'''", does anybody know how I can add self signed certificates to node-webkit's truststore !? OS: ubuntu 14.10 The problem here is that the browser is blocking the call to that server because that server has an invalid certificate. Since

Trying to use mongoose with node-webkit target on Webpack

强颜欢笑 提交于 2019-12-04 00:20:51
I use webpack and target it's build output for node-webkit . I want to require the mongoose module inside my project to connect to mongodb, but it always states some errors when I try to pack the project: WARNING in ./~/mongoose/~/mongodb/~/mongodb-core/~/bson/~/bson-ext/ext/index.js Module not found: Error: Cannot resolve 'file' or 'directory' ./win32/x64/bson in /Users/Johannes/Documents/Development/holmes/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/bson/node_modules/bson-ext/ext @ ./~/mongoose/~/mongodb/~/mongodb-core/~/bson/~/bson-ext/ext/index.js 6:10

Node-Webkit - Starting Maximized

 ̄綄美尐妖づ 提交于 2019-12-03 23:25:47
I don't want a fullscreen application, but I would like to start a Node-Webkit application maximized. Can this be done? I am guessing its something to do with package.json, but can't seem to find what needs to be done. I don't think the manifest has an option to do that. Instead, call nw's Window.maximize() on startup. Something like: // Load native UI library var ngui = require('nw.gui'); // Get the current window var nwin = ngui.Window.get(); Sometime later, in onload or some other point where you're ready to show the window: onload = function() { nwin.show(); nwin.maximize(); } This is

用node-webkit 创建 osChina PC 客户端

对着背影说爱祢 提交于 2019-12-03 18:00:36
<div class="span9"> <div class="content"><header class="page-header"> <div class="icon"></div> <time datetime="2013-07-03T00:00:00.000Z"><a href="/2013/07/03/nodeWebkitApp/">7月 3 2013</a></time> </header> <div id="post" class="entry"> <h2 id="menuIndex0">导言</h2> <p>node-webkit 是一个很神奇的桌面客户端项目,正如这个项目的名字,这个项目是由node 和 webkit 构成,简单来说,就是你可以用HTML 5和 node 进行桌面客户端开发,而且客户端还是同时支持在 WIN,MAC,LINUX运行. 下面,就用一个简单的例子来展示一下node-webkit的魅力. <a name="more"></a></p> <h2 id="menuIndex1">创建项目</h2> <h3 id="menuIndex2">本例子基于Grunt构建</h3> <p>如果,你用过grunt,要创建一个node-webkit 非常简单,我已经写好了一个node-webkit的<code>grunt-init</code>的项目模板

Node Webkit clear cache

六月ゝ 毕业季﹏ 提交于 2019-12-03 16:27:54
I recently discovered that c:/Users/username/AppData/Local/AppName/Cache contained over 100K cache files. I read up a bit and saw that the gui.App.clearCache() method should fix this. I execute this method at start and at shutdown of the app. (after assigning gui to require("nw.gui") ) However, this doesn't seem to help. Nothing is being deleted. Any ideas why that is? The require cache is apparently only available on global.require.cache . Clearing that cache manually made it work for me. for(module in global.require.cache){ if(global.require.cache.hasOwnProperty(module)){ delete global

open a file with default program in node-webkit

两盒软妹~` 提交于 2019-12-03 14:04:42
问题 I want to give the user any option he want to edit a file, how can I open a file with the default program of the specific file type? I need it to work with Windows and Linux but Mac option would be great too. 回答1: as PSkocik said, first detect the platform and get the command line : function getCommandLine() { switch (process.platform) { case 'darwin' : return 'open'; case 'win32' : return 'start'; case 'win64' : return 'start'; default : return 'xdg-open'; } } second , execute the command

How to package a NW.js application on Windows

Deadly 提交于 2019-12-03 13:36:23
问题 I am reading the instructions for how to package a NW.js app and the wording is a confusing mess and makes no sense. I highlighted the contradictory word-salad parts. Create a zip file (this is built into XP, Vista and 7) Copy all of your files into the zip file , retaining directory structure and making sure that the package.json file is in the root directory (if you make a zip file containing a folder with your stuff in it, then it's not going to work ) Rename the file extension from .zip

Making a node.js application a PEER with WebRTC

折月煮酒 提交于 2019-12-03 12:57:26
So, I have a web app that generates large buffers of color information that I want to send to a node application running on another machine in my local network. Web Sockets doesn't seem to be fast enough for me. I was looking to use UDP and it seems WebRTC is the only way to do that from a browser. The caveat, it seems, is WebRTC is only PEER to PEER (browser to browser). I figured, I could use node webkit to emulate being my other "PEER". In my node app I could handle the "signaling" and have it set itself up in a RTCPeerConnection to my web app. Therefore, I could send my data from my web

How to open a browser window from a node-webkit app?

核能气质少年 提交于 2019-12-03 12:42:51
问题 I have a desktop application, packaged using node-webkit. I need to open the default browser of the user on click of a link. I am using window.open("www.google.com") but this opens a new node-webkit window rather than opening a browser window. How do I open a browser window instead?? 回答1: To open a link in the user's default browser, you could use gui.Shell.openExternal("http://website.com") . Checkout the documentation for gui.Shell. 来源: https://stackoverflow.com/questions/19157659/how-to