【文件属性】:
文件名称:cfx.js:CFX.re HTTP API的简单NodeJS包装器
文件大小:17KB
文件格式:ZIP
更新时间:2021-04-10 04:20:49
TypeScript
CFX.JS
项目的简单包装器。
这是做什么的?
当前,这仅支持FiveM服务器上的GET请求URL。 但是,这也附带了一些文件(漂亮的类型定义/info.json , /dynamic.json )与以支持更多的功能。
如何使用它?
使该API易于使用。 这是一个基本示例:
// use `.default` for type definitions
const cfx = require ( '@blocky/cfx.js' ) . default ;
( async ( ) => {
let server = cfx ( 'http://localhost:3000' ) ;
let serverInfo = await server . getInfo ( ) ;
console . log ( serverInfo . artifactVersio
【文件预览】:
cfx.js-master
----package.json(796B)
----tslint.json(68B)
----.github()
--------workflows()
----.prettierrc(167B)
----LICENSE(1KB)
----src()
--------CFXServer.ts(2KB)
--------index.ts(718B)
--------helpers()
----tsconfig.json(440B)
----.gitignore(2KB)
----README.md(1KB)
----yarn.lock(21KB)
----.editorconfig(159B)