Created
April 28, 2020 22:20
-
-
Save scripting/68984626822359ae2bec1112719f1f2c to your computer and use it in GitHub Desktop.
Run an AWS command line script from a Node app (demo)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
aws s3 cp example.sh s3://scripting.com/tmp/example.sh --acl public-read |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "shellexec", | |
"description": "Test app to run a shell script from a node app", | |
"author": "Dave Winer <[email protected]>", | |
"version": "0.4.0", | |
"scripts": { | |
"start": "node test.js" | |
}, | |
"dependencies" : { | |
"shelljs": "*" | |
}, | |
"license": "MIT", | |
"engines": { | |
"node": "*" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const shell = require ("shelljs"); | |
shell.exec ("sh example.sh"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment