Skip to content

QuentG/NodeJS_Project

Repository files navigation

NodeJS_Project

Quentin Gans Ingesup B2B

NodeJs project : CLI command ask-me-something

Realize thanks to the openDB API : https://opentdb.com/api_config.php

Description

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 😏.

List of available options

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

Modules

  • 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

Installation

MacOs 💻

sudo npm install -g

Windows (execute the command prompt as administrator)

npm install -g

⚠️ If you encounter an error of the type

Error: Cannot find module 'node_modules/sqlite3/lib/binding/node-v59-linux-x64/node_sqlite3.node'

Make a

npm install sqlite3

Problem(s)

  • Encoding concerns at question level (unresolved)

Releases

No releases published

Packages

No packages published