List

Nota: Semua setup dilakukan pada Mac OS 10.11

Guna redis & bcrypt

#brew install redis
#npm install bcrypt

RUN redis

#brew services start redis
#redis-cli

Cek key yg ada dalam redis

#key *

install kt app node js

#npm i –save bcrypt jsonwebtoken

install ioredis

#npm i –save ioredis

Create file auth.route.js dalam folder routes
Create file auth.controller.js dalam folder controllers

Create file redis.js kat root folder dan config

const Redis = require(“ioredis”);
const redisClient = new Redis({
port:6379,
host:’127.0.0.1′,
db:0
})
module.exports = redisClient

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

  Posts

1 2
September 20th, 2021

FortiClient VPN 7 with MacOS Big Sur 11 Issue [SOLVED]

January 6th, 2021

Drupal 8 – PHPMailer SMTP

June 23rd, 2020

Drupal 8 – Setup composer dalam macOS

June 15th, 2020

Flutter (Mac OS) – Penyediaan Persekitaran

March 14th, 2019

Drupal 8 – Composer, Drush & Git

January 3rd, 2019

Node JS – Authentication using JSON Web Token (JWT)

January 3rd, 2019

Node JS – Set config ENV (dotenv)

January 3rd, 2019

Cara setup dan guna GitHub

January 2nd, 2019

Node JS – Connect to database Oracle with knex

January 2nd, 2019

Node Js – Training 2