This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Alpine, Livewire} from '../vendor/livewire/livewire/dist/livewire.esm'; | |
let isTooltipHovered = false; | |
document.addEventListener('mouseover', function (event) { | |
if (event.target.matches('[data-bs-toggle="tooltip"]') || | |
(event.target.closest('.tooltip') && bootstrap.Tooltip.getInstance(event.target.closest('.tooltip')))) { | |
isTooltipHovered = true; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream adoniswebsocket { | |
# IP:Port | |
server 127.0.0.1:3333 weight=5 max_fails=3 fail_timeout=30s; | |
keepalive 16; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApplicationContract } from '@ioc:Adonis/Core/Application' | |
export default class AppProvider { | |
constructor(protected app: ApplicationContract) {} | |
public register() { | |
// Register your own bindings | |
} | |
public async boot() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WebSocket } from 'ws' | |
import Ws from 'App/Services/Ws' | |
let clientId: number = 0; | |
Ws.boot() | |
const serverIo = Ws.wss; | |
/** | |
* Listen for incoming socket connections | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WebSocketServer } from 'ws' | |
import AdonisServer from '@ioc:Adonis/Core/Server' | |
class Ws { | |
public wss: WebSocketServer | |
private booted = false | |
public boot() { | |
/** | |
* Ignore multiple calls to the boot method |