Gestion nom de domaine websocket
This commit is contained in:
parent
409e13277e
commit
256f0b7684
@ -1,5 +1,5 @@
|
|||||||
import { io } from 'socket.io-client'
|
import { io } from 'socket.io-client'
|
||||||
|
|
||||||
export const socket = io("http://192.168.1.198:3000", {
|
export const socket = io(process.env.EXPO_PUBLIC_TRAINTRAPE_MOI_SERVER, {
|
||||||
reconnection: true,
|
reconnection: true,
|
||||||
})
|
})
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
DATABASE_URL="postgres://username:password@localhost:5432/traintrape-moi"
|
DATABASE_URL="postgres://username:password@localhost:5432/traintrape-moi"
|
||||||
JWT_SECRET="CHANGE_ME"
|
JWT_SECRET="CHANGE_ME"
|
||||||
API_GLOBAL_PREFIX="api"
|
API_GLOBAL_PREFIX="api"
|
||||||
|
API_HOSTNAME="traintrape-moi.luemy.eu"
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
import { SubscribeMessage, WebSocketGateway, WebSocketServer } from '@nestjs/websockets'
|
import { SubscribeMessage, WebSocketGateway, WebSocketServer } from '@nestjs/websockets'
|
||||||
import { Server, Socket } from 'socket.io'
|
import { Server, Socket } from 'socket.io'
|
||||||
|
|
||||||
@WebSocketGateway()
|
@WebSocketGateway({
|
||||||
|
cors: { allowedHeaders: process.env.API_HOSTNAME },
|
||||||
|
})
|
||||||
export class GeolocationsGateway {
|
export class GeolocationsGateway {
|
||||||
@WebSocketServer()
|
@WebSocketServer()
|
||||||
server: Server
|
server: Server
|
||||||
|
Loading…
Reference in New Issue
Block a user