Merge pull request #9 from wmantly/hostsCLI

Hosts cli
This commit is contained in:
William Mantly 2019-09-02 11:25:12 -04:00 committed by GitHub
commit 03d6973171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 27 additions and 17 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
LICENSE Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
api.md Normal file → Executable file
View File

0
app.js Normal file → Executable file
View File

25
hostcontrol.js Executable file
View File

@ -0,0 +1,25 @@
#! /usr/bin/env node
//you must add the absolute path to hosts.js on line 4, or this file will NOT work
const hosts = require("./models/hosts.js")
const command = process.argv[2];
(async function(command){
if (command == "--list"){
console.log(await hosts.listAll())
process.exit(0)
}
})(command)
/*
if process.argv[2] == "--info"
if process.agrv[2] == "--add"
if process.argv[2] == "--remove"
else{
console.log("help text")
}
*/

0
middleware/auth.js Normal file → Executable file
View File

0
models/auth.js Normal file → Executable file
View File

0
models/hosts.js Normal file → Executable file
View File

0
models/users.js Normal file → Executable file
View File

19
package-lock.json generated Normal file → Executable file
View File

@ -1579,24 +1579,14 @@
"version": "github:wmantly/linux-user#94ce2f75a5cc365355ca10d2f5b824c6f0180609", "version": "github:wmantly/linux-user#94ce2f75a5cc365355ca10d2f5b824c6f0180609",
"from": "github:wmantly/linux-user", "from": "github:wmantly/linux-user",
"requires": { "requires": {
"bluebird": "^3.5.5", "bluebird": "^3.5.5"
"lru-cache": "^5.1.1"
} }
}, },
"linux-user": { "linux-user": {
"version": "github:wmantly/linux-user#94ce2f75a5cc365355ca10d2f5b824c6f0180609", "version": "github:wmantly/linux-user#94ce2f75a5cc365355ca10d2f5b824c6f0180609",
"from": "github:wmantly/linux-user", "from": "github:wmantly/linux-user",
"requires": { "requires": {
"bluebird": "^3.5.5", "bluebird": "^3.5.5"
"lru-cache": "^5.1.1"
}
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"requires": {
"yallist": "^3.0.2"
} }
}, },
"map-cache": { "map-cache": {
@ -2911,11 +2901,6 @@
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"yallist": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
} }
} }
} }

0
package.json Normal file → Executable file
View File

0
redis.js Normal file → Executable file
View File

0
routes/auth.js Normal file → Executable file
View File

0
routes/index.js Normal file → Executable file
View File

0
routes/routes.js Normal file → Executable file
View File

0
routes/users.js Normal file → Executable file
View File

0
ssh-keygen Normal file → Executable file
View File