100HP
  1. DDL-example
100HP
  • 100HP API for partners v2.9.1
    • General
      • Overview
      • FAQ
        • Rollback and billing resolver general flow
        • HTTP status codes and custom error codes
        • IP Whitelisting
    • Integration
      • Preparation for integration
      • General API provision
    • 100HP Gaming API
      • Game list
      • Launch game url
      • Video replay
    • 100HP Game flow API
      • Player authorization
      • Get balance
      • Withdrawal money
      • Deposit money
      • Rollback money
    • Implementation Guide
      • YourCasino.js
      • Casino.js
      • TestCasino.js
      • DDL-example
        • mongodb.js
        • mysql.js
        • postgres.js
    • Testing
      • Automated Test Service
    • API INFO
      • API Changelog
  1. DDL-example

postgres.js

import pg from 'pg';

export default ({ user, password, database, host, port }) => {
  const pool = new pg.Pool({
    user,
    password,
    database,
    host,
    port,
  });

  // We are adding queryRow for consistency
  pool.queryRow = async (...args) => {
    const res = await pool.query(...args);
    return res.rows[0];
  };

  return pool;
};
Modified at 2026-01-28 14:21:23
Previous
mysql.js
Next
Testing
Built with