Skip to content

Instantly share code, notes, and snippets.

View gaurav1999's full-sized avatar

Gaurav Agrawal gaurav1999

  • India
View GitHub Profile
import { Controller, Get } from '@nestjs/common';
import { AppService } from './app.service';
import { SqsMessageProducer } from './sqs-producer/sqs-message-producer.service';
@Controller()
export class AppController {
constructor(
private readonly appService: AppService,
private readonly sqsProducer: SqsMessageProducer,
) {}
@gaurav1999
gaurav1999 / redis-client.js
Last active April 23, 2022 13:06
Redis-invite-code
import { createClient } from 'redis';
let REDIS_CLIENT = null;
export const getConnection = async(url) => {
if(!!REDIS_CLIENT) return REDIS_CLIENT;
try {
const client = createClient(url);
client.on('error', (err) => {throw err});
server {
# The internal IP of the VM that hosts your Apache config
set $upstream 0.0.0.0:6000 ;
location / {
proxy_pass_header Authorization;
proxy_pass http://$upstream;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
@gaurav1999
gaurav1999 / superset.service
Created June 6, 2021 07:42
superset systemd
[Unit]
# Describe the metadata of the service
Description="Apache Superset"
After=network.target
# Service specifies the user and group under which our process will run.
#Replace with your username
Hello