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
π See license