This file contains 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 ( | |
"context" | |
"fmt" | |
"sync" | |
"time" | |
) | |
func worker(wg *sync.WaitGroup, ctx context.Context, i int, ci <-chan int, co chan<- string) { |
This file contains 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
// db.ts | |
import { Pool, PoolClient } from 'pg'; | |
import dotenv from 'dotenv'; | |
dotenv.config(); | |
const pool = new Pool({ | |
connectionString: process.env.POSTGRES_URL, | |
}); |