@srcds/log-receiver
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    NPM version NPM downloads

    Receiver of SRCDS logs

    Installation

    Node.js 14.0.0 or newer is required

    Yarn

    yarn add @srcds/log-receiver
    

    NPM

    npm i @srcds/log-receiver
    

    Example usage

    import { SrcdsLogReceiver } from '@srcds/log-receiver';
    
    const receiver = new SrcdsLogReceiver({
    	// hostname: '0.0.0.0',
    	// port: 9871,
    
    	// onlyRegisteredServers: false
    });
    
    receiver.addServers({
        hostname: '127.0.0.1',
        port: 27015,
    
        // password: '1234'
    });
    
    receiver.on('log', (log) => {
    	console.log('Log', log);
    });
    
    receiver.on('error', (error) => {
    	console.log('error', error);
    });
    
    async function run() {
    	await receiver.listen();
    
    	console.log('Server running');
    }
    
    run().catch(console.log);

    Install

    npm i @srcds/log-receiver

    DownloadsWeekly Downloads

    5

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    23 kB

    Total Files

    16

    Last publish

    Collaborators

    • negezor