Call SteamCMD from Node.js
$ npm install --save steamcmd
SteamCMD works faster if all its required ports are available:
- UDP 27015 through 27030
- TCP 27015 through 27030
const steamcmd = require('steamcmd'); steamcmd.download(); //=> returns a Promise for downloading steamcmd locally steamcmd.touch(); //=> returns a Promise for ensuring that steamcmd is updated and dependencies exist steamcmd.prep(); //=> returns a Promise for downloading and updating steamcmd steamcmd.getAppInfo(730); //=> returns a Promise for the app info of appID 730 steamcmd.updateApp(90, path.resolve('hlds')); //=> returns a Promise for installing/updating the Half-Life Dedicated Server into 'hlds'
Downloads SteamCMD for the current OS into
opts.binDir already exists and is accessible.
Ensures SteamCMD is usable by running it with no arguments and exiting.
download([opts]), waits briefly to avoid
EBUSY, then runs
Asks SteamCMD to get the latest app info for the given app.
steamcmd.updateApp(appid, installDir[, opts])
Asks SteamCMD to install/update the given app to the given absolute
directory. Throws a
installDir is not absolute.
true if the update succeeded or
false if it wasn't required.
If SteamCMD's stdout isn't recognized, throws it as an error.
All functions take an optional options parameter.
The directory to use when downloading and running
steamcmd_bin in the same directory where this package is installed.
The tests run in parallel and do a significant amount of downloading and IO.
If you're running programs that scan downloaded files, like anti-virus or
anti-malware (e.g. Windows Defender Realtime Protection), the test processes
may run very slowly or be blocked with
EBUSY. Try temporarily disabling such
programs while running the tests.
MIT © Matt Horn