Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use Realtime dev stand instead of mock #54

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ await conversation.messages.delete(msg)
```json5
{
"id": "string",
"client_id": "string",
"created_by": "string",
"conversation_id": "string",
"content": "string",
"reactions": {
Expand Down
3 changes: 3 additions & 0 deletions demo/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ABLY_API_KEY=
VITE_ABLY_HOST=eu-west-2-a.primary.chat.cluster.ably-nonprod.net

1 change: 0 additions & 1 deletion demo/api/ably-token-request/.env.example

This file was deleted.

7 changes: 6 additions & 1 deletion demo/api/ably-token-request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ Please see README.md for more details on configuring your Ably API Key.`);
}

const clientId = event.queryStringParameters?.['clientId'] || process.env.DEFAULT_CLIENT_ID || 'NO_CLIENT_ID';
const client = new Ably.Rest(process.env.ABLY_API_KEY);
const client = new Ably.Rest({
key: process.env.ABLY_API_KEY,
restHost: process.env.VITE_ABLY_HOST,
realtimeHost: process.env.VITE_ABLY_HOST,
});
const tokenRequestData = await client.auth.createTokenRequest({
capability: {
'conversations:*': ['publish', 'subscribe', 'presence'],
'[conversation]*': ['*'],
},
clientId: clientId,
});
Expand Down
12 changes: 0 additions & 12 deletions demo/api/conversations/controllers/conversationsController.ts

This file was deleted.

62 changes: 0 additions & 62 deletions demo/api/conversations/controllers/messagesController.ts

This file was deleted.

34 changes: 0 additions & 34 deletions demo/api/conversations/controllers/reactionsController.ts

This file was deleted.

138 changes: 0 additions & 138 deletions demo/api/conversations/inMemoryDb.ts

This file was deleted.

12 changes: 0 additions & 12 deletions demo/api/conversations/index.ts

This file was deleted.

Loading
Loading