https://github.com/c-w/bgio-azure-storage
Azure Storage database connector for boardgame.io
https://github.com/c-w/bgio-azure-storage
azure-storage boardgame-io
Last synced: 5 months ago
JSON representation
Azure Storage database connector for boardgame.io
- Host: GitHub
- URL: https://github.com/c-w/bgio-azure-storage
- Owner: c-w
- License: mit
- Created: 2020-04-25T14:27:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T22:28:56.000Z (about 1 year ago)
- Last Synced: 2024-04-23T23:51:00.491Z (about 1 year ago)
- Topics: azure-storage, boardgame-io
- Language: TypeScript
- Homepage:
- Size: 3.29 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# bgio-azure-storage
[](https://www.npmjs.com/package/bgio-azure-storage)
[](https://github.com/c-w/bgio-azure-storage/actions)
[](https://coveralls.io/github/c-w/bgio-azure-storage?branch=master)> Azure Storage database connector for [boardgame.io](https://boardgame.io/)
This package provides a database connector that allows you to use an [Azure Storage](https://azure.microsoft.com/en-us/services/storage/) account to store boardgame.io metadata and game state.
## Installation
```sh
npm install --save bgio-azure-storage
```## Versioning
The major and minor versions of this package follow the major and minor versions of the upstream [boardgame.io package](https://www.npmjs.com/package/boardgame.io).
## Usage
```js
const { AzureStorage } = require('bgio-azure-storage');
const { BlobServiceClient } = require('@azure/storage-blob');
const { Server } = require('boardgame.io/server');
const { MyGame } = require('./game');const database = new AzureStorage({
client: BlobServiceClient.fromConnectionString('enter your connection string here'),
container: 'boardgameio',
});const server = Server({
games: [MyGame],
db: database,
});server.run(8000);
```