Skip to content

joepinion/bgio-postgres

 
 

Repository files navigation

bgio-postgres - PostgreSQL storage adapter for boardgame.io

Usage

You can use the PostgresStore in two ways. Either provide credentials using a URI as only argument, or by using an options object.

import { Server } from "boardgame.io/server";
import { PostgresStore } from "bgio-postgres";

// EITHER provide a URI
const db = new PostgresStore("postgresql://<username>:<password>@<host>/<database>");

// OR provide options
const db = new PostgresStore({
  database: "database",
  username: "username",
  password: "password",
  host: "host",
});

const server = Server({
  games: [...],
  db,
});

About

PostgreSQL storage adapter for boardgame.io

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 72.5%
  • JavaScript 27.5%