stringify message with flatted

This commit is contained in:
2019-04-26 05:44:07 +10:00
parent f9d25e211a
commit 1251f2918c
3 changed files with 8 additions and 3 deletions

View File

@@ -1,8 +1,7 @@
const fs = require('fs');
const https = require('https');
const WebSocket = require('ws');
const { parse, stringify } = require('flatted/cjs');
module.exports = {
name: "Websockets Server (8080)",
@@ -42,7 +41,7 @@ module.exports = {
}))
dclient.on('message', (message) => {
ws.send(message.cleanContent)
ws.send(stringify(message))
})
});