This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /**** .Net App ****/ | |
| var builder = WebApplication.CreateBuilder(args); | |
| var app = builder.Build(); | |
| app.MapGet("/", () => "Hello "+Guid.NewGuid().ToString()); | |
| app.Run(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /**** .NET app ****/ | |
| var builder = WebApplication.CreateBuilder(args); | |
| var app = builder.Build(); | |
| app.MapGet("/", () => "Hello "+Guid.NewGuid().ToString()); | |
| app.Run(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| COMMON FILE FOR EXPRESS, FASTIFY, KOA, HAPI, RESTIFY, AND HYPER EXPRESS APPS | |
| */ | |
| import { DataTypes, Sequelize } from "sequelize"; | |
| const dbUser = process.env.dbUser; | |
| const dbUserPass = process.env.dbUserPass; | |
| const dbName = process.env.dbName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| THIS THE ONLY RELEVANT FILE FOR NESTJS APP | |
| */ | |
| import { Module } from "@nestjs/common"; | |
| import { ServeStaticModule } from "@nestjs/serve-static"; | |
| import { AppController } from "./app.controller"; | |
| @Module({ | |
| imports: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use jsonwebtoken::{decode, encode, Algorithm, DecodingKey, EncodingKey, Header, Validation}; | |
| use serde::{Deserialize, Serialize}; | |
| use std::env; | |
| use std::fs; | |
| #[derive(Debug, Serialize, Deserialize)] | |
| struct Claims { | |
| sub: String, | |
| iat: u128, | |
| exp: u128, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "io/ioutil" | |
| "github.com/golang-jwt/jwt" | |
| "strconv" | |
| "os" | |
| "time" | |
| "fmt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mycompany.app; | |
| import java.util.List; | |
| import javax.crypto.SecretKey; | |
| import java.lang.reflect.Type; | |
| import java.util.Date; | |
| import java.nio.file.Files; | |
| import java.nio.file.Paths; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import os | |
| import sys | |
| import time | |
| import jwt | |
| f = open("/Users/mayankc/Work/source/perfComparisons/testdata/emails.json") | |
| emails = json.load(f) | |
| i = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import jwt from "jsonwebtoken"; | |
| import { readFileSync } from "node:fs"; | |
| const emails = JSON.parse( | |
| readFileSync( | |
| "/Users/mayankc/Work/source/perfComparisons/testdata/emails.json", | |
| ), | |
| ); | |
| let i = 1, idx = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import jwt from "jsonwebtoken"; | |
| import { readFileSync } from "node:fs"; | |
| const emails = JSON.parse( | |
| readFileSync( | |
| "/Users/mayankc/Work/source/perfComparisons/testdata/emails.json", | |
| ), | |
| ); | |
| let i = 1, idx = 0; |