zr-private-server 中文文档教程
ZRprivateServer
一套完整的工具,用于运行您自己的 ZombsRoyale.io 私人服务器。
安装
安装之前,下载并安装 Node.js。
如果这是一个全新的项目,请确保首先创建一个 package.json
npm init
命令。
安装是使用 npm install
命令:
$ npm install zr-private-server
使用
API 服务器
const { ApiServer } = require('zr-private-server');
// Initialize an API server
const server = new ApiServer({
name: 'My Example ZRPS',
database: {
url: 'localhost',
port: 3306,
user: 'root',
password: '123456'
}
});
// Optionally subscribe to events
server.events.on('started', () => {
console.log('Server started on port 3031');
});
// Start the server
server.start(3031);
功能
ApiServer
是 ZombsRoyale.io API 的直接替代品。
免责声明(法律内容)
该私人服务器仅供教育用途。它不适用于商业用途或在生产环境中使用。本服务器上提供的信息和材料仅供一般参考之用。我们不保证本服务器上提供的信息或材料的准确性、完整性或及时性。通过使用本服务器,您承认您对您的行为以及因使用本服务器上提供的信息或材料而可能导致的任何后果承担全部责任。对于因您使用本服务器或本服务器上提供的信息或材料可能导致的任何损失或损害,我们不承担任何责任。
许可
麻省理工学院
ZRprivateServer
A complete suite of tools to run your own ZombsRoyale.io private server.
Installation
This is available as a Node.js module available through the npm registry.
Before installing, download and install Node.js.
If this is a brand new project, make sure to create a package.json
first with the npm init
command.
Installation is done using the npm install
command:
$ npm install zr-private-server
Usage
API Server
const { ApiServer } = require('zr-private-server');
// Initialize an API server
const server = new ApiServer({
name: 'My Example ZRPS',
database: {
url: 'localhost',
port: 3306,
user: 'root',
password: '123456'
}
});
// Optionally subscribe to events
server.events.on('started', () => {
console.log('Server started on port 3031');
});
// Start the server
server.start(3031);
Features
ApiServer
is a drop-in replacement for the ZombsRoyale.io API.
Disclaimer (Legal Stuff)
This private server is intended for educational use only. It is not intended for commercial use or for use in a production environment. The information and materials provided on this server are for general informational purposes only. We do not guarantee the accuracy, completeness, or timeliness of the information or materials provided on this server. By using this server, you acknowledge that you are solely responsible for your actions and any consequences that may result from your use of the information or materials provided on this server. We are not liable for any loss or damage that may result from your use of this server or the information or materials provided on this server.
License
MIT