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 { DataTypes, Sequelize } from "sequelize"; | |
| const dbUser = process.env.dbUser; | |
| const dbUserPass = process.env.dbUserPass; | |
| const dbName = process.env.dbName; | |
| const sequelize = new Sequelize( | |
| `postgres://${dbUser}:${dbUserPass}@localhost:5432/${dbName}`, | |
| { | |
| logging: false, |
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 { DataTypes, Sequelize } from "sequelize"; | |
| const dbUser = process.env.dbUser; | |
| const dbUserPass = process.env.dbUserPass; | |
| const dbName = process.env.dbName; | |
| const sequelize = new Sequelize( | |
| `postgres://${dbUser}:${dbUserPass}@localhost:5432/${dbName}`, | |
| { | |
| logging: false, |
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 { DataTypes, Sequelize } from "sequelize"; | |
| const dbUser = process.env.dbUser; | |
| const dbUserPass = process.env.dbUserPass; | |
| const dbName = process.env.dbName; | |
| const sequelize = new Sequelize( | |
| `postgres://${dbUser}:${dbUserPass}@localhost:5432/${dbName}`, | |
| { | |
| logging: false, |
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 webfluxdemo; | |
| import org.springframework.data.annotation.Id; | |
| import org.springframework.data.relational.core.mapping.Table; | |
| @Table(name = "users") | |
| public class User { | |
| @Id | |
| private String email; |
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.example.demo; | |
| import jakarta.persistence.Entity; | |
| import jakarta.persistence.Table; | |
| import jakarta.persistence.GeneratedValue; | |
| import jakarta.persistence.GenerationType; | |
| import jakarta.persistence.Id; | |
| @Entity | |
| @Table(name = "users") |
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.example.demo; | |
| import jakarta.persistence.Entity; | |
| import jakarta.persistence.Table; | |
| import jakarta.persistence.GeneratedValue; | |
| import jakarta.persistence.GenerationType; | |
| import jakarta.persistence.Id; | |
| @Entity | |
| @Table(name = "users") |
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 webfluxqr; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.core.io.ClassPathResource; | |
| import org.springframework.web.reactive.config.EnableWebFlux; | |
| @EnableWebFlux | |
| @SpringBootApplication |
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.example.qr; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.boot.web.embedded.tomcat.TomcatProtocolHandlerCustomizer; | |
| import org.springframework.context.annotation.Bean; | |
| import java.util.concurrent.Executors; | |
| @SpringBootApplication | |
| public class QrApplication { |
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] | |
| name = "actix_qr_generator" | |
| version = "0.1.0" | |
| edition = "2021" | |
| [dependencies] | |
| actix-web = { version = "4", features = ["openssl"] } | |
| qrcode-generator = "4.1.8" | |
| serde = { version = "1.0", features = ["derive"] } | |
| serde_json = "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
| package main | |
| import ( | |
| "net/http" | |
| "github.com/gin-gonic/gin" | |
| qrcode "github.com/skip2/go-qrcode" | |
| ) | |
| type QrRequest struct { | |
| UrlToEmbed string `json:"urlToEmbed"` |