This is a simple command-line tool that generates a QR code image and saves it to a file, along with saving the corresponding URL to a text file.
Make sure you have the following dependencies installed in your project:
inquirer
- For user input prompts.qr-image
- For generating QR code images.fs
- For file system operations.
You can install these dependencies using npm:
npm install inquirer qr-image fs
-
Clone this repository or download the code files to your local machine.
-
Open a terminal and navigate to the project directory.
-
Run the command below to execute the QR code generator:
node index.js
-
You will be prompted to enter a URL. Type the URL and press Enter.
-
The program will generate a QR code image based on the provided URL and save it as
qr_img.png
. It will also save the URL to a text file namedURL.txt
. -
Verify that the QR code image and text file have been created in the project directory.