Skip to content

Commit e385695

Browse files
committed
add: story-app
1 parent fb0b64a commit e385695

File tree

398 files changed

+64323
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

398 files changed

+64323
-0
lines changed

chat-app/.DS_Store

2 KB
Binary file not shown.

chat-app/assets/.DS_Store

0 Bytes
Binary file not shown.

story-app/assets/androidjs.js

Lines changed: 306 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
27.5 KB
Loading
9.27 KB
Loading

story-app/assets/icon/icon.png

25.7 KB
Loading

story-app/main.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const back = require('androidjs').back;
2+
const fs = require('fs');
3+
const path = require('path');
4+
5+
6+
// defin signal save-data to listen from front process
7+
8+
back.on('save-data', function(filepath, msg){
9+
fs.writeFile(path.join(filepath, 'data.txt'), msg, function(err){
10+
if(err) throw err;
11+
console.log('file saved')
12+
})
13+
})
14+
15+
back.on('get-data', function(filepath){
16+
fs.readFile(path.join(filepath, 'data.txt'), 'utf-8', function(err, data){
17+
if(err) back.send('get-data-result', '@@');
18+
else back.send('get-data-result', data);
19+
})
20+
})

story-app/node_modules/Buffer/README.md

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

story-app/node_modules/Buffer/index.js

Lines changed: 98 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

story-app/node_modules/Buffer/package.json

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)