add dynamic env vars

This commit is contained in:
Samuel Andert 2023-08-23 09:30:08 +02:00
parent 3e2ee1ee0f
commit e42c3df210

View File

@ -10,7 +10,7 @@ const client = createClient({
keepAlive: 30000, keepAlive: 30000,
webSocketImpl: WebSocket, webSocketImpl: WebSocket,
connectionParams: async () => { connectionParams: async () => {
return { access_token: 'Mb3NMqKwiyesxDeJRTD72VZZ6f4t3mBr' }; return { access_token: process.env.DIRECTUS_API };
}, },
}); });
@ -27,6 +27,8 @@ client.subscribe(
date_updated date_updated
user_updated { user_updated {
first_name first_name
last_name
email
} }
} }
} }