DEV Community

Discussion on: Nodejs Expressjs MongoDB Ready-to-use API Project Structure

Collapse
 
maitraysuthar profile image
Maitray Suthar

Happy to hear that it helps you. :)

Collapse
 
iceboss3d profile image
Ayebakuro Ombu

The same applies to SendGrid's API in the node env, except it's hard coded it doesn't work.

Thread Thread
 
maitraysuthar profile image
Maitray Suthar

You can refer env.example file. Where you can find configured variables & its examples.

Collapse
 
iceboss3d profile image
Ayebakuro Ombu

I don't know if I should ask this here or on GitHub, but when I deploy to heroku, I have issues with the environment variables.

"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60

A log of the environment variable shows that the variable in heroku settings is correct.

Collapse
 
iceboss3d profile image
Ayebakuro Ombu

never mind, figured it out. I wrapped the variables using ' ', i removed it and it works