You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Luno/loggers/cmds.js

13 lines
439 B

const ws = require('ws');
const chalk = require('chalk');
const port = 1029;
const wss = new ws.Server({port: port});
console.log(`\n${chalk.white("[BOOT]")} >> ${chalk.greenBright(`Initialized Websocket on`)} ${chalk.white(`port ${port}`)}\n`);
wss.on('connection', (ws) => {
console.log(`\n${chalk.white("[SCKT]")} >> ${chalk.blue("Received new websocket connection")}\n`);
ws.on('message', (msg) => {console.log(msg);});
});