Arma 3 Life Database
arma3-life-db is a Node.js package for reading and updating values in an Arma 3 Life server database.
Requirements
- Node.js and npm
- A MySQL or MariaDB database reachable by the application
- Database credentials with the access needed for the queries you plan to run
Install
From your Node.js project, install the package:
npm install --save arma3-life-db
The package is also listed on npm.
Configure the database connection
The package README documents a Config call with these fields:
- IP: database server address
- Port: database port
- Database: database name
- Username: database account
- Password: that account's password
Initialize the connection before calling the query helpers. Keep real database credentials out of source control and use an appropriate private configuration mechanism for your application.
Query and update values
The documented helpers are Query_Get(table, column, search column, search value) and Query_Update(table, column, new value, search column, search value). Query_Get reads one selected value; Query_Update changes the selected value. Review the exact examples and parameter behavior in the project README before using an update against a live database.