Skip to content

Instantly share code, notes, and snippets.

Avatar

Sanjay Gurung Saspian

View GitHub Profile
View loginHandle.js
import React, { useState } from 'react';
import { useHistory } from 'react-router-dom';
import Login from './Component/index';
import { useFormik } from 'formik';
import * as Yup from 'yup';
import { useMutation, gql } from '@apollo/react-hooks';
export default () => {
const history = useHistory();
const [loginData, setLoginData] = useState({
@Saspian
Saspian / redis-node-caching.js
Created Jul 26, 2020
Redis and Node js caching
View redis-node-caching.js
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.REDIS_PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
You can’t perform that action at this time.