# @bayatgames/savegamepro-mysql

> Save Game Pro Cloud, Node.js MySQL Database Support.

Latest version **1.0.2** (published 2018-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @bayatgames/savegamepro-mysql
pnpm add @bayatgames/savegamepro-mysql
yarn add @bayatgames/savegamepro-mysql
bun add @bayatgames/savegamepro-mysql
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-03-27 |
| First published | 2017-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 (+11 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Hasan Bayat |
| Maintainers | empireworld |
| Keywords | bayat, bayatgames, savegame, savegamepro, savegame-cloud, unity, unity3d |

## Links

- npm: https://www.npmjs.com/package/@bayatgames/savegamepro-mysql
- Repository: https://github.com/BayatGames/node-savegamepro-mysql
- Homepage: https://github.com/BayatGames/node-savegamepro-mysql#readme
- Issues: https://github.com/BayatGames/node-savegamepro-mysql/issues
- npm.io page: https://npm.io/package/@bayatgames/savegamepro-mysql

## Dependencies (5)

- [mysql](https://npm.io/package/mysql.md) ^2.15.0
- [multer](https://npm.io/package/multer.md) ^1.3.0
- [express](https://npm.io/package/express.md) ^4.16.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [body-parser](https://npm.io/package/body-parser.md) ^1.18.2

## Recent versions

- 1.0.2 (latest) — 2018-03-27
- 1.0.1 — 2017-10-30
- 1.0.0 — 2017-10-30

## README

# Save Game Pro Cloud - Node.js MySQL

Save Game Pro Cloud, Node.js MySQL Database Support.

## Installation

You can install the Save Game Pro Cloud - Node.js MongoDB support via below ways:

- [NPM](#npm) (Recommended)
- [Clone](#clone)
- [Download](#download)

Also, we can install it for you:

- [Automatic Installation](#automatic-installation)

### NPM

Install it via [NPM](https://npmjs.com) (Node Package Manager):

```
npm install @bayatgames/savegamepro-mysql --save
```

And then include it in your server script: (Express Recommended)

```javascript
const express = require('express');
const bodyParser = require('body-parser');
const saveGamePro = require('@bayatgames/savegamepro-mysql');
const app = express();

saveGamePro.config.secretKey = 'MyCustomSecretKey';
saveGamePro.config.database.host = 'localhost';
saveGamePro.config.database.user = 'root';
saveGamePro.config.database.password = '';
saveGamePro.config.database.name = 'savegamepro';

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
  extended: true
}));
app.post('/savegamepro', saveGamePro);
app.listen(3000, function () {
  console.log('Example app listening on port 3000!');
});
```

Now run the script from the command line:

```bash
node app.js
```

You can find the full working example in the [app.js](https://github.com/BayatGames/node-savegamepro-mysql/blob/master/app.js) file.

### Clone

Clone it using Git:

```
git clone https://github.com/BayatGames/node-savegamepro-mysql.git
```

Open the directory:

```bash
cd node-savegamepro-mysql
```

Run the App:

```bash
node app.js
```

### Download

[Download the ZIP](https://github.com/BayatGames/node-savegamepro-mysql/archive/master.zip) file and extract it and Open the folder then run the below command:

```bash
node app.js
```

## Getting Started

Make sure you have installed the package successfully and the server is running, now go back to Unity and save a simple data to make sure the server is working.

The URL for this example should be `http://localhost:3000/savegamepro` if you are running the server in localhost.

Now fill the required fields in the Unity, for example make sure the Secret Key is same in both server and Unity.

Play the game and make a simple request and make sure the request is successful, also, check the database for the saved data and user.

## Automatic Installation

Don't want to install manually, contact us and we will be happy to install it for you:

[Support](https://github.com/BayatGames/Support)

It is a paid service and the operator will report back to you the price.

## Resources

- [Save Game Pro](https://github.com/BayatGames/SaveGamePro)
- [Node.js](https://nodejs.org)
- [MySQL](https://www.mysql.com)
- [Express.js](https://expressjs.com/)
- [Support](https://github.com/BayatGames/Support)

## License

MIT @ [Bayat Games](https://github.com/BayatGames)

Made with :heart: by [Bayat Games](https://github.com/BayatGames)

---
_Source: https://npm.io/package/@bayatgames/savegamepro-mysql · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
