A QR code generator that generates QR codes in ASCII format using qrcode-terminal.
- 🎤 Live preview
- 🖥 API
- 💾 Sample data
- ✂️ Fast copy & paste
curl {SCHEME}://{HOST}:{PORT}/api/get-qr?data={DATA}
For example, data=https://github.com/christofferEkblom/ascii-qr-code-generator
will give this response:
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █▀▀ ██▀█ █▀█▄▀█▄ ██ ▄▄▄▄▄ █
█ █ █ █▄▀██▀▀█▄█▄▀█▄█ ▀██ █ █ █
█ █▄▄▄█ █ ▄ █ █▄ ▄▀█▀▄▀▀▄▀█ █▄▄▄█ █
█▄▄▄▄▄▄▄█ █ ▀▄▀▄▀▄▀▄█▄▀▄█ █▄▄▄▄▄▄▄█
█▄ █ █▀▄ ▀▀█ ▀▄█▀█▄▄▀ ▀█ ▀ ▄▄▀▄▄▀█
█ ▀█ ▀▄▄▄ ▀▀ ▄▀▄█▀ ▀ ██ ▄▄█ ▄█▀ █
█▀ ▄ ▄▀▄█▀▀▄ █▀ █▄ █ ▀▀█▀▄ ▀▀ ▀▀ █
███▀▄ ▄█ ██ █▄▄█▄▀ █▄▀▀▄█▄ ▀█ █ ██
█▀▄█▀█▀▄ ▀▄██ ▀█ █▄▄▄▄▀▀▀▄█▄▀▀█▄█
██▄▀ ▀ ▄█▄▄▀▄ █ ▀█ ▀▀█ ▄▀█ █▄ █▄▄█
███▀ ▀▄▄▀ █▀██▀█ ▀██ ██ ▀▀▄█▄▀▄▀█
█▄ ▀ ▄ ▀████▀█▀██ ▀ █▀▄██▀▀ █▀ █
█▄██▄▄▄▄█▀█ ▀ ██▄▄ █▀ ▄▀█ ▄▄▄ ███▀█
█ ▄▄▄▄▄ █▄▀██ ▀▀▀▀ ▀█ ▀██ █▄█ ██ ██
█ █ █ █▀▄ ▄█▄▄█▀ ▄█ ▄▄█▄▄ █▀███
█ █▄▄▄█ █▀▀▄▀█ ███▀▀█▀ █▀▀██ ▄▄█▄█
█▄▄▄▄▄▄▄█▄▄▄▄▄█▄█▄██▄█▄██▄▄▄▄▄██▄██
curl {SCHEME}://{HOST}:{PORT}/api/get-random-sample-data
curl {SCHEME}://{HOST}:{PORT}/api/get-sample-data-list
curl {SCHEME}://{HOST}:{PORT}/oauth/token \
-d "grant_type=client_credentials" \
-H "Authorization: Basic base64({CLIENT ID}:{CLIENT SECRET})" \
-H "Content-Type: application/x-www-form-urlencoded"
For example, to use user:secretcode
, you can type the following (if you have OpenSSL installed):
echo -n 'user:secretcode' | openssl base64
The output should be dXNlcjpzZWNyZXRjb2Rl
.
Therefore, you should send:
Authorization: Basic dXNlcjpzZWNyZXRjb2Rl
curl --data "data={POST DATA}" {SCHEME}://{HOST}:{PORT}/api \
-H "Authorization: Bearer {ACCESS TOKEN}"
curl -X "DELETE" {SCHEME}://{HOST}:{PORT}/api/{POST ID} \
-H "Authorization: Bearer {ACCESS TOKEN}"
- Clone this repository
git clone https://github.com/christofferEkblom/ascii-qr-code-generator.git
- Go to the directory
cd ascii-qr-code-generator
- Create .env file for the environment variables
nano .env
- Set the following variables:
PORT = {APPLICATION PORT NUMBER}
MONGODB_CONNECTION_STRING = {MONGO DB CONNECTION STRING}
OAUTH2_CLIENT_ID = {CLIENT ID}
OAUTH2_CLIENT_SECRET = {CLIENT SECRET}
- Install the npm packages
npm install
- 🏁 Finish! To run the application, type:
npm start
- Node.js
- oauth2
- SASS
- MongoDB
🇸🇪Christoffer Ekblom