account page stubbed: link to etsy sign up
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
func newPool(ctx context.Context) (*pgxpool.Pool, error) {
|
||||
pool, err := pgxpool.New(ctx, "postgres://app_client:app_password@localhost:5432/inventory_2?sslmode=disable")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create database client: %w", err)
|
||||
}
|
||||
|
||||
conn, err := pool.Acquire(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create a database connection: %w", err)
|
||||
}
|
||||
conn.Release()
|
||||
|
||||
return pool, nil
|
||||
}
|
||||
Reference in New Issue
Block a user