Quentin Gans Ingesup B2B
NodeJs project : CLI command ask-me-something
Realize thanks to the openDB API : https://opentdb.com/api_config.php
The quizz command is used to answer 3 categories of quizzes that each have 10 questions in the form of true / false. Quiz in English 😏.
Orders | Description |
---|---|
-V, --version |
Displays the version of the command |
-t, --theme |
See available themes |
-m, --music |
Quiz on the music |
-h, --history |
Quiz on the story |
-j, --videos |
Quiz about video games |
-u, --adduser <name> |
Add a user to the database or play as an user |
-s, --showuser |
List of users who have already played |
--help |
Displays help |
- Axios : Retrieving API data
- Commander : Added quizz option -[option]
- Inquirer : Choice of answer for the user (here True / False)
- fs : Allows writing scores to a file
- sqlite3 : Storing users in a database
MacOs 💻
sudo npm install -g
Windows (execute the command prompt as administrator)
npm install -g
Error: Cannot find module 'node_modules/sqlite3/lib/binding/node-v59-linux-x64/node_sqlite3.node'
Make a
npm install sqlite3
- Encoding concerns at question level (unresolved)