Skip to content

Commit 671a107

Browse files
committed
fixing email reset issue and cleanup on app launch
1 parent 7cf7b45 commit 671a107

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/email/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const sendMail = async (to, subject, html, text) => {
3535
* @param {string} resetPasswordToken temporary token for the reset password link
3636
*/
3737
const sendForgotPassword = async (userEmail, resetPasswordToken) => {
38-
const emailResetLink = `https://healthcare-rollcall.netlify.com/reset/${resetPasswordToken}`;
38+
const emailResetLink = `https://healthcarerollcall.org/reset/${resetPasswordToken}`;
3939
await sendMail(
4040
userEmail,
4141
"Password Reset - Healthcare Roll Call",

src/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,14 @@ app.use((error, req, res, next) => {
7777
});
7878

7979
// Starting Express and connecting to PostgreSQL
80-
sequelize.sync().then(async () => {
81-
app.listen(process.env.PORT || 3000, () => {
82-
console.log(`Bmore Responsive is available at http://localhost:${process.env.PORT || 3000}`);
80+
try {
81+
sequelize.sync().then(() => {
82+
app.listen(process.env.PORT || 3000, () => {
83+
console.log(`Bmore Responsive is available at http://localhost:${process.env.PORT || 3000}`);
84+
});
8385
});
84-
});
86+
} catch (e) {
87+
console.error(e);
88+
}
8589

8690
export default app;

0 commit comments

Comments
 (0)