-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Android
Android is tricky in general. There are restrictions due to Androids storage access measurements.
Playstore: https://play.google.com/store/apps/details?id=io.tempage.dorynode
Github: https://github.com/tempage/dorynode
Mobile apps with HTML, CSS & JS
Target multiple platforms with one code base
Free and open source
Website: https://cordova.apache.org/
Tutorial: https://cordova.apache.org/docs/en/11.x/guide/cli/index.html
You can easily run NodeJS apps on an Android phone with Termux (NOTICE: Termux is broken on Android 10-12, fix in progress)
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.
APK: https://f-droid.org/en/packages/com.termux/
Here is a simple gun relay server.
Start a new repo:
// server.js
;(function(){
var gun = require('gun/examples/http');
if(!gun.back){ return } // http example auto spawns subprocess
var fs = require('fs');
var server = gun.back('opt.web');
var route = server.route = {}
fs.readdir('./route', function(err, dir){
if(err || !dir){ return }
dir.forEach(function(file){
if(!file){ return }
route[file.split('.')[0]] = require('./route/'+file);
});
});
// with this line you can type a message on http://localhost:8765/basic/paste.html and check if the server works.
gun.get('test').on(data => console.log(data))
}());
-npm gun
-npm start