Skip to content
Open
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
6 changes: 6 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="YOUR_PUBLIC_CLERK_KEY"
CLERK_SECRET_KEY="YOUR_SECRET_CLERK_KEY"


NEXT_PUBLIC_STREAM_PUBLIC_KEY="YOUR_PUBLIC_STREAM_CHAT_KEY"
STREAM_CHAT_SECRET="YOUR_SECRET_STREAM_CHAT_KEY"
2 changes: 1 addition & 1 deletion app/api/register-user/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StreamChat } from 'stream-chat';

export async function POST(request: Request) {
const serverClient = StreamChat.getInstance(
'7cu55d72xtjs',
process.env.NEXT_PUBLIC_STREAM_PUBLIC_KEY!,
process.env.STREAM_CHAT_SECRET
);
const body = await request.json();
Expand Down
2 changes: 1 addition & 1 deletion app/api/token/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { StreamChat } from 'stream-chat';

export async function POST(request: Request) {
const serverClient = StreamChat.getInstance(
'7cu55d72xtjs',
process.env.NEXT_PUBLIC_STREAM_PUBLIC_KEY!,
process.env.STREAM_CHAT_SECRET
);
const body = await request.json();
Expand Down
2 changes: 1 addition & 1 deletion app/api/users/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StreamChat } from 'stream-chat';

export async function GET() {
const serverClient = StreamChat.getInstance(
'7cu55d72xtjs',
process.env.NEXT_PUBLIC_STREAM_PUBLIC_KEY!,
process.env.STREAM_CHAT_SECRET
);
const response = await serverClient.queryUsers({});
Expand Down
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import MyChat from '@/components/MyChat';
// const userId = '7cd445eb-9af2-4505-80a9-aa8543c3343f';
// const userName = 'Harry Potter';

const apiKey = '7cu55d72xtjs';
const apiKey = process.env.NEXT_PUBLIC_STREAM_PUBLIC_KEY!
// const userToken =
// 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiN2NkNDQ1ZWItOWFmMi00NTA1LTgwYTktYWE4NTQzYzMzNDNmIn0.TtrCA5VoRB2KofI3O6lYjYZd2pHdQT408u7ryeWO4Qg';

Expand Down
4 changes: 4 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ const nextConfig = {
protocol: 'https',
hostname: 'starwars.fandom.com',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
},
],
},
};
Expand Down