-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve errors that thrown as following the installation guide o…
…n docs.namviek.com (#173)
- Loading branch information
Showing
39 changed files
with
599 additions
and
612 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,47 @@ | ||
DEV_MODE=true | ||
DEV_MODE=1 | ||
DEFAULT_PWD=123123123 | ||
NEXT_PUBLIC_FE_GATEWAY=http://localhost:4200/ | ||
NEXT_PUBLIC_BE_GATEWAY=http://localhost:3333/ | ||
NEXT_PUBLIC_APP_NAME=Namviek | ||
|
||
MONGODB_URL= | ||
MONGODB_URL=mongodb+srv://{user}:{pwd}@cluster0.wd3az.mongodb.net/{dbName}?retryWrites=true&w=majority | ||
|
||
JWT_SECRET_KEY=12GUY3N76U21d4IJ | ||
JWT_REFRESH_KEY=7us9s88o121ieeuo | ||
JWT_VERIFY_USER_LINK_TOKEN_EXPIRED=1h | ||
|
||
JWT_TOKEN_EXPIRED=30m | ||
JWT_REFRESH_EXPIRED=4h | ||
|
||
REDIS_HOST= | ||
# Visit https://resend.com/api-keys to get API key | ||
|
||
RESEND_TOKEN= | ||
RESEND_EMAIL_DOMAIN= | ||
|
||
# AWS s3 token | ||
AWS_ACCESS_KEY= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_REGION=ap-southeast-1 | ||
AWS_S3_BUCKET=kampunistore | ||
|
||
# Replicate Api Token: https://replicate.com/meta/llama-2-70b-chat/api | ||
REPLICATE_API_TOKEN= | ||
|
||
# Open API Key | ||
OPEN_API_KEY= | ||
|
||
JWT_VERIFY_USER_LINK_TOKEN_EXPIRED=1h | ||
RESEND_EMAIL_DOMAIN=namviek.com | ||
NEXT_PUBLIC_FE_GATEWAY=http://localhost:4200/ | ||
AWS_REGION= | ||
AWS_S3_BUCKET= | ||
|
||
# Pusher notification | ||
NEXT_PUBLIC_PUSHER_INSTANCE_ID= | ||
PUSHER_INSTANCE_ID= | ||
PUSHER_SECRET_KEY= | ||
|
||
# Pusher channels | ||
NEXT_PUBLIC_PUSHER_CHANNEL_APP_KEY= | ||
NEXT_PUBLIC_PUSHER_CHANNEL_APP_CLUSTER= | ||
PUSHER_CHANNEL_APP_ID= | ||
PUSHER_CHANNEL_SECRET= | ||
|
||
# Livekit | ||
LIVEKIT_API_KEY= | ||
LIVEKIT_API_SECRET= | ||
NEXT_PUBLIC_LIVEKIT_URL= | ||
|
||
FIREBASE_PROJECT_ID= | ||
FIREBASE_CLIENT_EMAIL= | ||
FIREBASE_PRIVATE_KEY= | ||
NEXT_PUBLIC_FIREBASE_CLIENT_CONFIG= | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ We're using Pusher/channel to push a message from server to client. For instance | |
- When a user type a new comment, the other user will receive this comment immediately. | ||
- Or when a new user was added to a new project, he/she will be see it right after the manager update member list | ||
|
||
To use it, in your backend code, import the `pusherServer` and trigger an event as follows: | ||
To use it, in your backend code, import the `pusherTrigger` and trigger an event as follows: | ||
```javascript | ||
import { pusherServer } from '../../lib/pusher-server' | ||
import { pusherTrigger } from '../../lib/pusher-server' | ||
|
||
const eventName = `event-delete-task-comment` | ||
|
||
pusherServer.trigger('team-collab', eventName, { | ||
pusherTrigger('team-collab', eventName, { | ||
id, | ||
triggerBy: updatedBy | ||
}) | ||
|
@@ -93,4 +93,4 @@ NEXT_PUBLIC_LIVEKIT_URL|wss://namviek-hmunmehy.livekit.cloud|Livekit url|| | |
|-|-|-|-| | ||
|FIREBASE_PROJECT_ID|namviek-4234|Project id|| | ||
|FIREBASE_CLIENT_EMAIL|[email protected]|Client email generated by Firebase|| | ||
|FIREBASE_PRIVATE_KEY||Firebase private key|| | ||
|FIREBASE_PRIVATE_KEY||Firebase private key|| |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import { cert, initializeApp, getApps } from 'firebase-admin/app' | ||
|
||
const serviceAccount = { | ||
projectId: process.env.FIREBASE_PROJECT_ID, | ||
clientEmail: process.env.FIREBASE_CLIENT_EMAIL, | ||
privateKey: process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, '\n') | ||
} | ||
try { | ||
const serviceAccount = { | ||
projectId: process.env.FIREBASE_PROJECT_ID, | ||
clientEmail: process.env.FIREBASE_CLIENT_EMAIL, | ||
privateKey: process.env.FIREBASE_PRIVATE_KEY.replace(/\\n/g, '\n') | ||
} | ||
|
||
if (!getApps().length) { | ||
initializeApp({ | ||
credential: cert(serviceAccount) | ||
}) | ||
if (!getApps().length) { | ||
initializeApp({ | ||
credential: cert(serviceAccount) | ||
}) | ||
} | ||
} catch (error) { | ||
console.warn('Firebase admin missing configuration') | ||
} |
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
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
Oops, something went wrong.