Skip to content

Instantly share code, notes, and snippets.

View aatifbandey's full-sized avatar
🎯
Focusing

Aatif Bandey aatifbandey

🎯
Focusing
View GitHub Profile
import puppeteer from 'puppeteer-core';
export const executeCron = async()=> {
try {
const browser = await puppeteer.launch({
// headless: false,
args,
executablePath: __DEV__
? '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
: '/usr/bin/google-chrome-unstable',
const Router = require('koa-router');
const DataSet = require('./models/report');
const saveData = async ctx => {
const body = ctx.request.body;
if (!body) {
return {
status: 400,
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
mongoose.pluralize(null);
const dataSchema = new Schema(
{
desktop: {
pages: [],
},
const Redis = require("ioredis");
const redis = new Redis({
host: "localhost",
port: 3000,
keyPrefix: "cache",
logName: "html-redis",
});
const Warlock = require('node-redis-warlock');
syntax = "proto3";
package employee;
service Employee {
rpc paySalary (EmployeeRequest) returns (stream EmployeeResponse) {}
}
var init = function(){
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const PROTO_PATH = __dirname +'/salary.proto';
const packageDefinition = protoLoader.loadSync(
PROTO_PATH, {
keepCase: true,
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const PROTO_PATH = __dirname +'/salary.proto';
const packageDefinition = protoLoader.loadSync(PROTO_PATH, {
keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true,
var init = function(){
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const PROTO_PATH = __dirname +'/salary.proto';
const packageDefinition = protoLoader.loadSync(PROTO_PATH, {
keepCase: true,
longs: String,
enums: String,
defaults: true,
let employees = [
{
id: 1,
email: '[email protected]',
firstName: 'First1',
lastName: 'Last1',
},
{
id: 2,
email: '[email protected]',