Open shaungehring opened 9 years ago
You just have to drop the APK into the repo folder. The default directory is .apk_repo (watch the dot at the beginning) You may change it by using the third parameter of the 'enable' function.
All that is showing for me is blank JSON. I tried specifying a dir a few ways with no luck...
var apkUpdater = require('apk-updater');
var express = require('express');
var app = express()
apkUpdater.enable(app, '/', '~/node_modules/apk-updater/.apk_repo/');
var server = app.listen(8090, '127.0.0.1', function () {
var host = server.address().address;
var port = server.address().port;
console.log('Example app listening at http://%s:%s', host, port);
});
Not sure if you have solved it yet.
I used body-parser in my project.
var express = require('express');
var apkUpdater = require('apk-updater');
var app = express();
//These to lines are needed
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({extended : true}));
app.listen('9099', function () {
console.log("App listening on port 9099");
});
apkUpdater.enable(app, '/myDirectory');
Hi. Been experimenting with apk-updater.
I found that the only files listed from .apk-repo was files that had a name starting with 'test-' followed by a number. Any suggestion to make the servers scripts read all files in the directory?
Kind regards Erik Johansson
Hi,
cheked in lib/apkReader.js
the search pattern for APK files is apkPattern = /([\w\.]+)-(\d+)\.apk/;
Which means any file name composed as "anyString-aNumber.apk". In this example, the anyString is the package name and aNumber is package version.
I will update the current documentation with this explanation but feel free to suggest any better solution if you have one :)
@peturh Thanks, your server side work perfect. How do you deal with Android client side?
@malajisi I was never touched the Android, sorry. I only implemented the server side for it.
Can i get pointed to documentation? Do i just drop the signed apk into the folder? If so, i have and i do not see it represented in the JSON.