Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/toyobayashi/node-asar-encrypt
Encrypt your Node.js project
https://github.com/toyobayashi/node-asar-encrypt
Last synced: 12 days ago
JSON representation
Encrypt your Node.js project
- Host: GitHub
- URL: https://github.com/toyobayashi/node-asar-encrypt
- Owner: toyobayashi
- Created: 2022-04-20T04:07:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-20T04:08:11.000Z (over 2 years ago)
- Last Synced: 2024-11-05T22:46:10.269Z (2 months ago)
- Language: C
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-asar-encrypt
Similar solution to [toyobayashi/electron-asar-encrypt-demo](https://github.com/toyobayashi/electron-asar-encrypt-demo) (Chinese)
## Usage
```bash
git clone ...
cd ...
npm install
``````
node ./script/build
``````js
// config fileconst path = require('path')
module.exports = function () {
// return Promise is ok
return {
// absolute path to node project
appDir: path.join(__dirname, 'test'),
// absolute path to output
outDir: path.join(__dirname, 'out'),
// do not use asar
noAsar: false,
// split node_modules to node_modules.asar
// if noAsar === true this option will be ignored
splitNodeModules: true,
// application entry from native addon
requireFromMain: './app'
}
}// config object is ok
// module.exports = { ... }
```## Example
```bash
cd test
npm install
cd ..npm run build
node out/main.node
```