@Madchatthew You might be sorry you asked 🙂 This is the mentoring category below. Presently, it’s unused, but we have a dedicated area for it.
https://sudonix.org/category/8/mentoring
Other services
https://sudonix.org/services
@justoverclock If you were using NodeBB, then websocket support is free and part of core…
@phenomlab yeah but i need to develop around this so i need it for now.
php flarum realtime:serve -vvv --debug
Starting websocket server, which listens on 0.0.0.0:6001.
App key expected is #############################
App secret expected is #############################
Max connections 1000
@justoverclock and I see this in the log
[2021-10-11 15:10:01] flarum.DEBUG: trigger POST: {post_value} {"post_value":"{\"name\":\"Flarum\\\\Post\\\\Event\\\\Posted\",\"data\":\"{\\\"data\\\":{\\\"type\\\":\\\"discussions\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"title\\\":\\\"test\\\",\\\"slug\\\":\\\"1-test\\\",\\\"commentCount\\\":8,\\\"participantCount\\\":1,\\\"createdAt\\\":\\\"2021-10-11T14:37:36+00:00\\\",\\\"lastPostedAt\\\":\\\"2021-10-11T15:10:00+00:00\\\",\\\"lastPostNumber\\\":8,\\\"canReply\\\":false,\\\"canRename\\\":false,\\\"canDelete\\\":false,\\\"canHide\\\":false,\\\"isApproved\\\":true,\\\"canViewWhoTypes\\\":false,\\\"canTag\\\":false,\\\"subscription\\\":null,\\\"isSticky\\\":false,\\\"canSticky\\\":false,\\\"isLocked\\\":false,\\\"canLock\\\":false},\\\"relationships\\\":{\\\"tags\\\":{\\\"data\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\"}]},\\\"user\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPostedUser\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPost\\\":{\\\"data\\\":{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"8\\\"}}}},\\\"included\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"name\\\":\\\"General\\\",\\\"description\\\":null,\\\"slug\\\":\\\"general\\\",\\\"color\\\":\\\"#888\\\",\\\"backgroundUrl\\\":null,\\\"backgroundMode\\\":null,\\\"icon\\\":null,\\\"discussionCount\\\":0,\\\"position\\\":0,\\\"defaultSort\\\":null,\\\"isChild\\\":false,\\\"isHidden\\\":false,\\\"lastPostedAt\\\":\\\"2021-10-11T14:45:03+00:00\\\",\\\"canStartDiscussion\\\":false,\\\"canAddToDiscussion\\\":false}},{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"username\\\":\\\"Marko\\\",\\\"displayName\\\":\\\"Marko\\\",\\\"avatarUrl\\\":null,\\\"slug\\\":\\\"Marko\\\"}},{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"8\\\",\\\"attributes\\\":{\\\"number\\\":8,\\\"createdAt\\\":\\\"2021-10-11T15:10:00+00:00\\\",\\\"contentType\\\":\\\"comment\\\",\\\"contentHtml\\\":\\\"<p>dfg<\\\\\\/p>\\\"}}]}\",\"channels\":[\"guest\"]}"}
[2021-10-11 15:10:05] flarum.DEBUG: trigger POST: {post_value} {"post_value":"{\"name\":\"Flarum\\\\Post\\\\Event\\\\Posted\",\"data\":\"{\\\"data\\\":{\\\"type\\\":\\\"discussions\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"title\\\":\\\"test\\\",\\\"slug\\\":\\\"1-test\\\",\\\"commentCount\\\":9,\\\"participantCount\\\":1,\\\"createdAt\\\":\\\"2021-10-11T14:37:36+00:00\\\",\\\"lastPostedAt\\\":\\\"2021-10-11T15:10:05+00:00\\\",\\\"lastPostNumber\\\":9,\\\"canReply\\\":false,\\\"canRename\\\":false,\\\"canDelete\\\":false,\\\"canHide\\\":false,\\\"isApproved\\\":true,\\\"canViewWhoTypes\\\":false,\\\"canTag\\\":false,\\\"subscription\\\":null,\\\"isSticky\\\":false,\\\"canSticky\\\":false,\\\"isLocked\\\":false,\\\"canLock\\\":false},\\\"relationships\\\":{\\\"tags\\\":{\\\"data\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\"}]},\\\"user\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPostedUser\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPost\\\":{\\\"data\\\":{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"9\\\"}}}},\\\"included\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"name\\\":\\\"General\\\",\\\"description\\\":null,\\\"slug\\\":\\\"general\\\",\\\"color\\\":\\\"#888\\\",\\\"backgroundUrl\\\":null,\\\"backgroundMode\\\":null,\\\"icon\\\":null,\\\"discussionCount\\\":0,\\\"position\\\":0,\\\"defaultSort\\\":null,\\\"isChild\\\":false,\\\"isHidden\\\":false,\\\"lastPostedAt\\\":\\\"2021-10-11T15:10:00+00:00\\\",\\\"canStartDiscussion\\\":false,\\\"canAddToDiscussion\\\":false}},{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"username\\\":\\\"Marko\\\",\\\"displayName\\\":\\\"Marko\\\",\\\"avatarUrl\\\":null,\\\"slug\\\":\\\"Marko\\\"}},{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"9\\\",\\\"attributes\\\":{\\\"number\\\":9,\\\"createdAt\\\":\\\"2021-10-11T15:10:05+00:00\\\",\\\"contentType\\\":\\\"comment\\\",\\\"contentHtml\\\":\\\"<p>dfgdfgdfg<\\\\\\/p>\\\"}}]}\",\"channels\":[\"guest\"]}"}
[2021-10-11 15:10:10] flarum.DEBUG: trigger POST: {post_value} {"post_value":"{\"name\":\"Flarum\\\\Post\\\\Event\\\\Posted\",\"data\":\"{\\\"data\\\":{\\\"type\\\":\\\"discussions\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"title\\\":\\\"test\\\",\\\"slug\\\":\\\"1-test\\\",\\\"commentCount\\\":10,\\\"participantCount\\\":1,\\\"createdAt\\\":\\\"2021-10-11T14:37:36+00:00\\\",\\\"lastPostedAt\\\":\\\"2021-10-11T15:10:10+00:00\\\",\\\"lastPostNumber\\\":10,\\\"canReply\\\":false,\\\"canRename\\\":false,\\\"canDelete\\\":false,\\\"canHide\\\":false,\\\"isApproved\\\":true,\\\"canViewWhoTypes\\\":false,\\\"canTag\\\":false,\\\"subscription\\\":null,\\\"isSticky\\\":false,\\\"canSticky\\\":false,\\\"isLocked\\\":false,\\\"canLock\\\":false},\\\"relationships\\\":{\\\"tags\\\":{\\\"data\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\"}]},\\\"user\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPostedUser\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPost\\\":{\\\"data\\\":{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"10\\\"}}}},\\\"included\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"name\\\":\\\"General\\\",\\\"description\\\":null,\\\"slug\\\":\\\"general\\\",\\\"color\\\":\\\"#888\\\",\\\"backgroundUrl\\\":null,\\\"backgroundMode\\\":null,\\\"icon\\\":null,\\\"discussionCount\\\":0,\\\"position\\\":0,\\\"defaultSort\\\":null,\\\"isChild\\\":false,\\\"isHidden\\\":false,\\\"lastPostedAt\\\":\\\"2021-10-11T15:10:05+00:00\\\",\\\"canStartDiscussion\\\":false,\\\"canAddToDiscussion\\\":false}},{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"username\\\":\\\"Marko\\\",\\\"displayName\\\":\\\"Marko\\\",\\\"avatarUrl\\\":null,\\\"slug\\\":\\\"Marko\\\"}},{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"10\\\",\\\"attributes\\\":{\\\"number\\\":10,\\\"createdAt\\\":\\\"2021-10-11T15:10:10+00:00\\\",\\\"contentType\\\":\\\"comment\\\",\\\"contentHtml\\\":\\\"<p>ciaociaociao<\\\\\\/p>\\\"}}]}\",\"channels\":[\"guest\"]}"}
[2021-10-11 15:10:43] flarum.DEBUG: trigger POST: {post_value} {"post_value":"{\"name\":\"Flarum\\\\Post\\\\Event\\\\Posted\",\"data\":\"{\\\"data\\\":{\\\"type\\\":\\\"discussions\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"title\\\":\\\"test\\\",\\\"slug\\\":\\\"1-test\\\",\\\"commentCount\\\":11,\\\"participantCount\\\":1,\\\"createdAt\\\":\\\"2021-10-11T14:37:36+00:00\\\",\\\"lastPostedAt\\\":\\\"2021-10-11T15:10:43+00:00\\\",\\\"lastPostNumber\\\":11,\\\"canReply\\\":false,\\\"canRename\\\":false,\\\"canDelete\\\":false,\\\"canHide\\\":false,\\\"isApproved\\\":true,\\\"canViewWhoTypes\\\":false,\\\"canTag\\\":false,\\\"subscription\\\":null,\\\"isSticky\\\":false,\\\"canSticky\\\":false,\\\"isLocked\\\":false,\\\"canLock\\\":false},\\\"relationships\\\":{\\\"tags\\\":{\\\"data\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\"}]},\\\"user\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPostedUser\\\":{\\\"data\\\":{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\"}},\\\"lastPost\\\":{\\\"data\\\":{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"11\\\"}}}},\\\"included\\\":[{\\\"type\\\":\\\"tags\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"name\\\":\\\"General\\\",\\\"description\\\":null,\\\"slug\\\":\\\"general\\\",\\\"color\\\":\\\"#888\\\",\\\"backgroundUrl\\\":null,\\\"backgroundMode\\\":null,\\\"icon\\\":null,\\\"discussionCount\\\":0,\\\"position\\\":0,\\\"defaultSort\\\":null,\\\"isChild\\\":false,\\\"isHidden\\\":false,\\\"lastPostedAt\\\":\\\"2021-10-11T15:10:10+00:00\\\",\\\"canStartDiscussion\\\":false,\\\"canAddToDiscussion\\\":false}},{\\\"type\\\":\\\"users\\\",\\\"id\\\":\\\"1\\\",\\\"attributes\\\":{\\\"username\\\":\\\"Marko\\\",\\\"displayName\\\":\\\"Marko\\\",\\\"avatarUrl\\\":null,\\\"slug\\\":\\\"Marko\\\"}},{\\\"type\\\":\\\"posts\\\",\\\"id\\\":\\\"11\\\",\\\"attributes\\\":{\\\"number\\\":11,\\\"createdAt\\\":\\\"2021-10-11T15:10:43+00:00\\\",\\\"contentType\\\":\\\"comment\\\",\\\"contentHtml\\\":\\\"<p>sdgsfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf<\\\\\\/p>\\\"}}]}\",\"channels\":[\"guest\"]}"}
Are you able to post now ?
@phenomlab yes but i get console error about websocket
pusher.js:4026 WebSocket connection to ‘wss://forum.justoverclock.it:6001/app/1ddbcd118d43678d3943c6a3f3541ff2?protocol=7&client=js&version=7.0.3&flash=false’ failed:
@justoverclock I removed your app and key and secret. Don’t post anything sensitive
i think this is not valid for my server?
[program:realtime]
command=/usr/bin/php /var/www/flarum/flarum realtime:serve
numprocs=1
autostart=true
autorestart=true
user=www-data
@phenomlab u mean that u are working on this?
@justoverclock Correct. That path should be
/home/justoverclock/domains/forum.justoverclock.it/homes/flarum/public
@justoverclock No, I meant that you have posted sensitive information concerning your flarum installation on another public forum, which could expose your site to attack.
@phenomlab my file is now
[program:realtime]
command=/usr/bin/php /home/justoverclock/domains/forum.justoverclock.it/homes/flarum/public realtime:serve
numprocs=1
autostart=true
autorestart=true
user=www-data
but same error
@justoverclock Yes, I don’t expect the error to be any different to be honest. You’re running from the CLI anyway, and this path is for the supervisor service.
@phenomlab well…now i can’t post enymore…error 500
@justoverclock Seeing as this is a premium Flarum extension, and you’ve paid for support, you should ask there I think. From what I see in the logs, plus the way I know websockets work, I think you need additional config in nginx.conf
.
Compare this with the guide from kyrne
on discuss (which is completely free by the way and works 100%) - https://extiverse.com/extension/kyrne/websocket
For the record, I purchased Realtime before I departed the Flarum ecosystem, and it didn’t work - period, so I got a refund.
Just checked this thread on Discuss. It’s effectively not stable yet. My suggestion would be to use kyrne/websocket