Skip to content

Commit

Permalink
add admin
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jan 19, 2018
1 parent 3b7036b commit 99d8e99
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
14 changes: 14 additions & 0 deletions bin/add-admin
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env node

const AdminUserService = require('../service/admin/user')
const user = process.argv[2]
const password = process.argv[3]

if (!user || !password) {
console.error('usage: add-admin <user> <password>')
process.exit(1)
}

AdminUserService.create(user, password)
.then(() => console.log('success'))
.catch((err) => console.error(err))
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"express": "^4.15.4",
"express-promise-router": "^2.0.0",
"express-session": "^1.15.3",
"express-simple-route": "^1.5.1",
"express-simple-route": "^1.6.1",
"feed": "^1.1.0",
"font-awesome": "^4.7.0",
"fs-extra": "^4.0.1",
Expand Down

0 comments on commit 99d8e99

Please sign in to comment.