- Backend: Add server-side validation with go-playground/validator/v10 - Frontend: Add toast notifications for API errors with @zerodevx/svelte-toast - UI: Complete Tokyo Night theme redesign with modern animations - Docs: Update COMPLETE_DOCUMENTATION.md and README.md with all enhancements - Validation: Email format, password strength, and input sanitization - UX: Real-time error feedback, loading states, and responsive design
21 lines
340 B
Go
21 lines
340 B
Go
package database
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/jackc/pgx/v5/pgxpool"
|
|
)
|
|
|
|
func NewConnection(databaseURL string) (*pgxpool.Pool, error) {
|
|
pool, err := pgxpool.New(context.Background(), databaseURL)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if err := pool.Ping(context.Background()); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return pool, nil
|
|
}
|