在node-webkit桌面应用程序中保护源代码 [英] securing the source code in a node-webkit desktop application

查看:115
本文介绍了在node-webkit桌面应用程序中保护源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我见过 nwsnapshot .而且没有帮助.

first things first , i have seen nwsnapshot. and its not helping.

我正在使用 node-webkit 将其作为桌面应用程序来构建库存管理系统.正在构建的项目使用的是 compoundjs (mvc javascript库).其中有一个确定的文件夹结构(您知道mvc),并且其中包含多个javascript文件.

i am building an inventory management system as a desktop app using node-webkit . the project being built is using compoundjs (mvc javascript library). which have a definite folder structure (you know mvc) and multiple javascript files inside them.

问题是nwsnapshot允许应用程序只有一个快照文件,但是应用程序的逻辑分布在不同javascript文件中的所有文件夹中.

the problem is nwsnapshot allows the app to have only a single snapshot file but the logic of application is spread over all the folders in different javascript files.

那么,在将我的源代码发送给客户端之前,如何保护我的源代码?或其他任何解决方法或更聪明的方式(是的,我知道混淆).

so how do i secure my source code before shipping it to client? Or any other work-around Or smarter way (yes, i know about obfuscating).

推荐答案

您可以使用名为nwsnapshot的nodewebkit命令将javascript代码编译为二进制代码,而无需指定任何js文件即可将其加载到应用程序中

You can use nodewebkit command called nwsnapshot to compile the javascript code into binary which will be loaded into the app without specifying any js file

nwsnapshot --extra-code application.js application.bin

在您的package.json中添加以下内容:

in your package.json add this:

snapshot: 'application.bin'

这篇关于在node-webkit桌面应用程序中保护源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆