DEMO
This project is a simple QR Code generator built with Node.js. It uses the inquirer
package for command line user inputs and the qr-image
package for generating QR codes.
- Prompt the user to enter a URL.
- Generate a QR code based on the input URL.
- Save the generated QR code as a PNG image.
- Save the input URL to a text file.
Before running the application, make sure you have Node.js installed on your system.
- Clone the repository or download the source code.
- Navigate to the project directory in your terminal.
- Run the following command to install the required dependencies:
npm install inquirer qr-image fs
...
- Running the Script: Navigate to the project directory in your terminal and execute the following command:
node index.js
- Entering URL: Follow the on-screen prompt and enter the URL for which you want to generate the QR code.
- Output: After entering the URL, the script will generate a QR code and save it as
qr_image.png
in the project directory. Additionally, the entered URL will be saved in a text file namedurl.txt
.
Note: Make sure you have the necessary Node.js packages installed by running npm install
before executing the script.
...
Follow the on-screen prompt and enter the URL for which you want to generate the QR code. The QR code will be saved as qr_image.png
in the project directory, and the URL will be saved in a text file named url.txt
.
If an error occurs during the execution, the error will be logged to the console. If the prompt couldn't be rendered, it might be due to the current environment not supporting TTY.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page for any outstanding issues or to open a new one.
This project is open-source and available under the MIT License.
- Inquirer.js for user input.
- qr-image for QR code generation.
- Node.js for runtime environment.