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: add NEXT_PUBLIC_ to env #602

Merged
merged 1 commit into from
Jan 26, 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
46 changes: 30 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "v3.0.0-development",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "cross-env NODE_OPTIONS='--inspect' next dev",
"build": "next build",
"start": "next start",
"lint": "eslint --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore --fix src",
Expand All @@ -23,6 +23,7 @@
"@types/validator": "^13.11.5",
"axios": "^1.6.0",
"bad-words-next": "^2.2.1",
"cross-env": "^7.0.3",
"crypto-js": "^4.2.0",
"dotenv": "^16.3.1",
"emoji-picker-react": "^4.5.7",
Expand Down
2 changes: 2 additions & 0 deletions src/components/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ const Chat = () => {
oldMessage,
});

console.log({ editedMessage });

updateMessage({
...editedMessage,
roomId: app.currentRoomId,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/chatSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function useChatUtils(socket: Socket | undefined) {
reject(err);
return;
}

console.log({ sentMessage });
resolve(sentMessage);
}
);
Expand Down
2 changes: 1 addition & 1 deletion src/server/service/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let connection: Connection | null = null;
let mongooseInstance: Mongoose | null = null;

// Retrieve the MongoDB connection string from environment variables.
const connectionString = process.env.MongoDB_URL;
const connectionString = process.env.NEXT_PUBLIC_MongoDB_URL;

// Async function to establish and return a MongoDB connection.
const connectMongo = async (): Promise<Connection> => {
Expand Down
6 changes: 3 additions & 3 deletions src/service/mailService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ const sendMail = async (subject: string, toEmail: string, otpText: string) => {
const transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.NODEMAILER_EMAIL,
pass: process.env.NODEMAILER_PW,
user: process.env.NEXT_PUBLIC_NODEMAILER_EMAIL,
pass: process.env.NEXT_PUBLIC_NODEMAILER_PW,
},
});

const mailOptions = {
from: process.env.NODEMAILER_EMAIL,
from: process.env.NEXT_PUBLIC_NODEMAILER_EMAIL,
to: toEmail,
subject,
text: otpText,
Expand Down
Loading