-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from neirowork/develop
Shovel Red, Greenに追従
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "fais", | ||
"version": "1.35", | ||
"version": "1.36", | ||
"main": ".dist/index.js", | ||
"repository": "https://github.com/neirowork/FAIS.git", | ||
"author": "Tomotada Saigusa <[email protected]>", | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import * as Shovel from './../helpers/shovel-db'; | ||
|
||
const main = async (): Promise<void> => { | ||
if (process.argv.length !== 3) { | ||
console.error('引数が足りません'); | ||
return process.exit(-1); | ||
} | ||
|
||
const db = new Shovel.DB('mongodb://localhost:27017', 'fais'); | ||
await db.start().then(() => { | ||
db.removeWord({ | ||
word: process.argv[2] | ||
}) | ||
.then(() => { | ||
console.log(`success 単語データ削除完了 ${process.argv[2]}`); | ||
}) | ||
.catch(err => { | ||
throw err; | ||
}); | ||
}); | ||
}; | ||
|
||
main(); |
This file contains 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