https://github.com/opengsq/opengsq-node
Node.js library designed for querying game servers. It supports 1 query protocols.
https://github.com/opengsq/opengsq-node
game game-server-query opengsq server-query source ts typescript
Last synced: about 1 year ago
JSON representation
Node.js library designed for querying game servers. It supports 1 query protocols.
- Host: GitHub
- URL: https://github.com/opengsq/opengsq-node
- Owner: opengsq
- License: mit
- Created: 2024-01-18T02:29:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-05T22:56:58.000Z (about 1 year ago)
- Last Synced: 2025-05-13T00:10:04.087Z (about 1 year ago)
- Topics: game, game-server-query, opengsq, server-query, source, ts, typescript
- Language: TypeScript
- Homepage: https://node.opengsq.com
- Size: 453 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenGSQ Node Library
[](https://github.com/opengsq/opengsq-node/actions/workflows/node-build.yml)

[](https://www.npmjs.com/package/@opengsq/opengsq-node)



[](https://github.com/opengsq/opengsq-node/blob/main/LICENSE)
The OpenGSQ Node library provides a convenient way to query servers from applications written in the TypeScript language.
## Supported Protocols
The library supports a wide range of protocols. Here are some examples:
```ts
import * as opengsq from '@opengsq/opengsq-node';
```
## Installation
To install `@opengsq/opengsq-node`, run the following command in your project directory:
```sh
npm install -S @opengsq/opengsq-node
```
## Usage
Here’s an example of how to query a server using the Source protocol:
```ts
import * as opengsq from "@opengsq/opengsq-node";
async function main() {
const source = new opengsq.Source({
host: '91.216.250.10',
port: 27015
});
const info = await source.getInfo();
console.log("Info:", info);
const players = await source.getPlayers();
console.log("Players:", players);
const rules = await source.getRules();
console.log("Rules:", rules);
}
main();
```
## Contributing
Contributions are welcome! Please feel free to submit pull requests or open issues.

## Stargazers over time
[](https://starchart.cc/opengsq/opengsq-node)