How to Deploy a PERN application on Heroku

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 157

  • @TheMrsjacoblautner
    @TheMrsjacoblautner Před 2 lety +7

    You're a life saver! Been looking for a tutorial on deploying with the same stack. Thanks for the great explanations and context

  • @Darkfire889
    @Darkfire889 Před 3 lety +8

    Spent hours trying to figure out why it worked locally and not in Heroku. 503 Error in chrome, PostgreSQL error: no pg_hba.conf entry for host. Here is the fix....
    Heroku needs this line when creating the pool:
    ssl: {
    rejectUnauthorized: false,
    },
    This will fix the Heroku problem but break the dev server. Create a new pool conditionally for production/dev like this:
    const pool =
    process.env.NODE_ENV === "production"
    ? new Pool({
    connectionString: prodConfig,
    ssl: {
    rejectUnauthorized: false,
    },
    })
    : new Pool({
    connectionString: devConfig,
    });

    • @ThePyromaniac84
      @ThePyromaniac84 Před 3 lety

      Boy do i love you, had the same thing, i was getting error 503

    • @ThePyromaniac84
      @ThePyromaniac84 Před 3 lety +1

      This is the code i used to ensure it worked on local server too
      const pool =
      process.env.NODE_ENV === "production"
      ? new Pool({
      connectionString: proConfig,
      ssl: {
      rejectUnauthorized: false,
      },
      })
      : new Pool({
      connectionString: devConfig,
      });

    • @abhishekatnure3256
      @abhishekatnure3256 Před 3 lety

      i love you man it worked........... i was trying to solve this errror from last 15 days

    • @PinPonStyle
      @PinPonStyle Před 3 lety +1

      thank you. You just save me

    • @zacharyzawaideh8079
      @zacharyzawaideh8079 Před 2 lety

      You are amazing. Thank you so much, you saved my day for real I finished the whole tutorial and was super confused at why it would not work. Thank you so much

  • @KahramanMustafa
    @KahramanMustafa Před 2 lety +2

    Another great tutorial, thank you Henry, suppose name from package author info :)! I have watched the PERN tutorial prior to this tutorial, it was also great. I was looking how to deploy my react and node apps to an online server in a correct way for a long time. Your content, way of explaining and reasoning are well and easy to comprehend. Selected topics chosen well, they are practical fields widely seeked but rarely found enough info about them

    • @astkh4381
      @astkh4381 Před rokem

      hi can you explain what is .env.NODE_ENV 16:18?We dont have it in our .env

    • @abishek_stuff
      @abishek_stuff Před rokem

      ​@@astkh4381 not all environment variables need to come from your .env file, some can be set during the process initialisation, some can be set by the system itself, etc. One of those is process.env.NODE_ENV, which is set as PRODUCTION when built and run, vs run in npm run dev

  • @amiraskari8655
    @amiraskari8655 Před 4 lety +1

    There is really lack of content and tutorials on PERN stack. I really learned from every single video on your channel. Please keep up the great work. Hope you wont stop making these.
    Thanks :)

  • @thefantasynuttwork
    @thefantasynuttwork Před 4 lety +5

    Would love to see a forgot password video for the PERN app we have made. Thanks for the content!

  • @bibasniba1832
    @bibasniba1832 Před 4 lety +2

    Dear Henry,
    I am so glad I stumbled upon your channel. I’ve added every single one of your videos to a playlist to watch, and I just subscribed.
    Thank you so much!!!

  • @henryli85
    @henryli85 Před 3 lety +2

    From one Henry Li (Ly) to another, this was an amazing tutorial! Thank you!

  • @ahmed.hammami590
    @ahmed.hammami590 Před 2 lety

    you are the real mvp, i started at your pern tutorial video like a month ago, now that i undertsand react and node better i'm trying to deploy it on heroku and connect it to my salesforce org, been hard stuck until i came back to youtube and found this video and i was really happy to find out it's the same channel, your work is appreciated and helpful ! thank you so very much

    • @astkh4381
      @astkh4381 Před rokem

      hi can you explain what is .env.NODE_ENV 16:18?We dont have it in our .env

    • @OscarGarcia-dg6is
      @OscarGarcia-dg6is Před rokem

      @@astkh4381 I'm at the same place. I think you have to add this at the Config Vars on the Heroku Settings. That's what I did.

  • @RokasZebrauskas
    @RokasZebrauskas Před 3 lety +1

    I would just like to thank you for the tutorial , it helped me a lot since there are not many PERN deployment tutorials, but yours is spot on ! Good explanations and everything :)

  • @bv9876
    @bv9876 Před 2 lety

    Author plz come back. You did great lessons. I am russian and I don't understand english well, but your lessons are understood perfectly.

    • @mori7423
      @mori7423 Před 2 lety

      Если не знаешь английский, то это не твоё

    • @bv9876
      @bv9876 Před 2 lety

      @@mori7423 I don't agree )

    • @mori7423
      @mori7423 Před 2 lety

      @@bv9876 tak po angliiski ne pishut))))

  • @devops3249
    @devops3249 Před 2 lety +2

    My Site is up on Heroku as you instructed but database add delete or update is not working.Anything I have to look upon it? Thanks.

  • @nwkwok
    @nwkwok Před 3 lety

    Henry - your tutorials are so helpful. Thank you so much! Learning so much from the way your breakdown your tutorials.

  • @orange_coconut3537
    @orange_coconut3537 Před 3 lety

    Hi Henry, Thank you so much for this video. It helped me really when I deployed an app Heroku for the first time. It was so amazing that I introduced it and talked about what I learned in a tech blog in Japanese. If it is unacceptable, please let me know. I will remove it immediately. Thank you.

  • @EaglesFly101
    @EaglesFly101 Před 2 lety

    As a junior dev doing fun projects on the side to continue improving my skills, this is great stuff! I've been looking to deploy on Heroku with this specific stack so this is perfect, as well as the JWT videos you have. Thank you!

  • @yasinnkhann
    @yasinnkhann Před 3 lety +2

    I followed all your instructions. It works on my local server but when I deploy it I get, Failed to load resource: the server responded with a status of 503 (Service Unavailable)
    react_devtools_backend.js:4049 Unexpected token < in JSON at position 0

  • @vasiliv6872
    @vasiliv6872 Před 3 lety +4

    Thank you for the tutorial!
    I have a problem, when I try to open the app at Heroku I get error: Not found

  • @loicderty4555
    @loicderty4555 Před 4 lety

    nice tutorial ! PERN tutorials are so rare ! thanks you

  • @AdamAdam-xy6vh
    @AdamAdam-xy6vh Před 4 lety

    Your videos have taught me so much man. Amazing stuff.

  • @kyungssew3999
    @kyungssew3999 Před 3 lety

    Thank you so much for this tutorial. It really helps me a lot!

  • @mandihaase2744
    @mandihaase2744 Před 3 lety +3

    What is the best way to troubleshoot when my app is getting a 503 error? I am getting an unexpected token < in JSON at position 0 (my console is showing the error at const response = await fetch(`/todos`); it doesn't seem like the getTodos is working in production, even though it works locally. Any ideas on the best way to troubleshoot?

    • @user-se7hb8pm7y
      @user-se7hb8pm7y Před rokem

      in db.js:
      const proConfig = {
      connectionString: process.env.DATABASE_URL,
      ssl: { /*

  • @alglaser7296
    @alglaser7296 Před 3 lety

    Thank you so much!!! best teacher ever..!!!!!!!!!

  • @youssefelshabrawy7310
    @youssefelshabrawy7310 Před 2 lety

    YOU ARE A LEGEND!

  • @kage-musha1702
    @kage-musha1702 Před 2 lety

    would be really awesome if you do a tutorial on React Routers :)
    thank you for this tut btw

  • @yousefmedhat56
    @yousefmedhat56 Před 3 lety

    Thank you, Henry. You're great❤

  • @Supinpa
    @Supinpa Před 2 lety +1

    If anyone is using this with the previous JWT tutorial and you're getting a Unexpected JSON Token error, your JWT secret might not be getting pushed up to Heroku, what I did to fix this was to run this command: heroku config:set jwtSecret='mysecret!@' and it all started working properly.

  • @therichardchannel
    @therichardchannel Před 2 lety +1

    Anyone know why when I have it deployed on Heroku, the fetching routes aren't working? I can't GET, POST, or PUT, although the form shows and should work. It works fine on localhost:5000

    • @KahramanMustafa
      @KahramanMustafa Před 2 lety

      I have the same problem, seeking solutions

    • @KahramanMustafa
      @KahramanMustafa Před 2 lety

      I found a solution among comments. I have configured in the db.js, "proConfig" object, it worked.
      const proConfig = {
      connectionString: process.env.DATABASE_URL, // Heroku addons
      ssl: {
      rejectUnauthorized: false,
      }
      }

  • @KimFajardoPH
    @KimFajardoPH Před 4 lety +2

    Hello! I followed all your steps but I am facing a problem after heroku deployment. When I open my app on heroku, I get a "Not Found". Any fix for that? What could I have missed?

    • @JacobSwetmore
      @JacobSwetmore Před 4 lety

      I have the same issue! Did you manage to fix it?

  • @jennifermisewicz3259
    @jennifermisewicz3259 Před 3 lety

    This helped me out a ton. Thank you!

  • @gerardosalasm6213
    @gerardosalasm6213 Před 2 lety

    thank you for the tutorial,

  • @huletech
    @huletech Před 11 měsíci

    hi henry long time no see when do you back to your youtube channel we miss your video so much

  • @BlortNet
    @BlortNet Před 4 lety +1

    Nice work man

  • @DOPTRICK
    @DOPTRICK Před 4 lety +2

    Plz create full course of PERN stack. Or recommond me something plz. I am working on project and I would love to work with you.

  • @jeroldlim816
    @jeroldlim816 Před 2 lety

    i deployed the completed project to heroku, but it doesnt work. i get failed to load resource, server responded 503 and uncaught in promise "

  • @harryminnie6
    @harryminnie6 Před 4 lety

    to clear the cache issue. what worked for me was I just shut down my front end server and back end server. I then started my back end server first followed by my front end. it all seems to be working. I did not have to re-install my package.json and dependencies.

  • @volkanongun1112
    @volkanongun1112 Před 3 lety

    great tutorials Henry, watched all of them. Thanks for sharing!

  • @oabouassy
    @oabouassy Před 3 lety +2

    I managed to deploy my app, but once i open the app link, it crashes and error 503 in console

    • @pavloaleksyeyev5065
      @pavloaleksyeyev5065 Před 3 lety

      @Omar, did you resolve this error? I ran into the same issue

    • @oabouassy
      @oabouassy Před 3 lety +1

      @@pavloaleksyeyev5065 check ssl option when creating postgresql Client instance . This was the problem

    • @abhishekatnure3256
      @abhishekatnure3256 Před 3 lety

      @@oabouassy i am still getting this 503 error

    • @petarp3938
      @petarp3938 Před 3 lety +1

      @@oabouassy Can you be more specific?

    • @oabouassy
      @oabouassy Před 3 lety

      @@petarp3938 I solved it bro thanks

  • @chistoperez
    @chistoperez Před 2 lety +1

    FIX for error 503 (Service Unavailable) (ADD, UPDATE, DELETE not working) on db.js
    const proConfig = {
    connectionString: process.env.DATABASE_URL,
    ssl: { rejectUnauthorized: false },
    };
    const pool = new Pool( proConfig );

  • @OscarGarcia-dg6is
    @OscarGarcia-dg6is Před 2 lety

    Can you make a video showing what VSCODE Extensions you have installed? I've been watching your videos and there's some stuff happening when you hit save that my Extensions don't to. :/ I have to be very careful with some parenthesis and brackets.

  • @vasantharajants2917
    @vasantharajants2917 Před 4 lety +1

    This is a great tutorial but i have a problem after changing the proxy in package.json and deleting the package-lock.json and nodemodules i ran the command npm i and then i ran the server but it's showing the error:Failed to load resource: the server responded with a status of 401 (Unauthorized)

  • @jordanfox7751
    @jordanfox7751 Před 2 lety

    Is heroku good enough to handle the react side of an application? It seems this way works only with static applications, would someone be able to elaborate on what this means? is there any drawback of using heroku for both your front-end and back-end of a pern application? will there be scenarios where you must use another service for your front end?

  • @dimitartanev97
    @dimitartanev97 Před 3 lety

    Thank you, man.

  • @MrPogi-lf5gz
    @MrPogi-lf5gz Před 4 lety +2

    Can you also do a tutorial on Payment integration? And or image upload?

    • @TheQuackLearner
      @TheQuackLearner  Před 4 lety +1

      Thanks for the suggestion, I definitely look into those things!

    • @tcdesports5673
      @tcdesports5673 Před 4 lety

      @@TheQuackLearner I'm also looking forward to an image upload tutorial using PERN Stack

  • @akshaybisht3801
    @akshaybisht3801 Před 2 lety

    Sir I have a application on MySQL sequelize, React, Node and PhpMyAdmin..How to deploy the application on heroku for MySQL.

  • @kehindefasunle4933
    @kehindefasunle4933 Před 2 lety

    Fantastic 👏

  • @DJ-vn2xe
    @DJ-vn2xe Před 4 lety

    Thanks for the wonderful tutorial dude..it would help me a lot...!
    would this work fine if I used routes in my react app?

  • @kackupa752
    @kackupa752 Před 3 lety

    I have a blank root page; the landing, routing and login all work but my root is empty; Did I miss something? Also, my JWT fails authorization on reloading the web page, only when run through the server with static file or deployed to production. Anyone come up with a solution?

  • @karanbhatia6712
    @karanbhatia6712 Před 3 lety

    Thanks alot! Love

  • @ubaidkhan426
    @ubaidkhan426 Před 3 lety

    Thanks buddy!

  • @BlissAden
    @BlissAden Před 2 lety

    Can you push to heroku with only a backend node server like what you shown in the video?

  • @albertomatehuala5608
    @albertomatehuala5608 Před 4 lety

    It's an awesome project, but the node js version Changed a lot 'cause I had to use the specific version of this project on my current project, due to the index (server) never started or at least never catched the requests, that problem gave me a 503 code in heroku , to solve the problem just use the exact version of this project

  • @jumbo999614
    @jumbo999614 Před 3 lety

    Please make another video about Express-Validator. I tried to use it with react and routes controller and it didn't work.

  • @raflyananda8492
    @raflyananda8492 Před 2 lety

    Hey thank you so much for the tutorial, really helpful and well explained, but i'm still a little bit confused about the git in the local dev, when we do create-react-app, react already initialized a git repo on that folder(client), and when we were making the server (server folder), we also init a git repo, so my question is how does we interact with the code with git. example such as when making a change, do we need to do git command on both folders (git add . commit etc ) or just do it on the main one at the root of the project ? if so, what do we do to the git on the server and client folder ? sorry if i didn't explain it clearly

    • @charleslamb5810
      @charleslamb5810 Před 2 lety

      Rafly... great question. I stumbled upon your question at the perfect time since I struggled with this issue for days! If you have figured this out already disregard but I know it's a good possibility others are struggling with this as well...
      So... I don't think it was mentioned in this video(at least I don't remember it) but you are 100% correct that when you create react app it initializes a git repo, and this WILL cause conflicts because a git repository INSIDE of another git repository will be ignored by git. This git repository (the one buried inside of another one) is called a submodule. Like I said above submodules are always ignored by git so when you go to github you won't even see the contents of the submodule.
      Now here is the solution: when you have a submodule, like the client for instance all you have to do.... is delete the .git file. Now this is a hidden file so you will not see it with ls. Type ls -a and you will see the .git rear its ugly head. Delete this .git folder and you no longer have a submodule. At this point anytime you add to the staging area or git commit etc. It will include all folders on the project. It must have been done for the project on this video but was accidentally left out I suppose. What WAS done on the video is he took all of the contents of the server folder and put it into the root, this made one root level package.json and one root level.git for the entire project. I hope that helped because it drove me nuts lol.

    • @raflyananda8492
      @raflyananda8492 Před 2 lety +1

      @@charleslamb5810 hey sorry for the late reply, thank you so much really clear things up for me

  • @931112
    @931112 Před 4 lety +1

    Hi! would this work if im using sequelize + postgres? Thanks for the tutorial!

    • @931112
      @931112 Před 4 lety +1

      YES IT DOES! thanks!

  • @RoknRolls
    @RoknRolls Před 2 lety

    Why is this impossible to do using Digital Ocean? I can't find a guide anywhere for a PERN stack deployment that gets into this video's level of detail

    • @lifeisbeautifu1
      @lifeisbeautifu1 Před 2 lety

      czcams.com/video/xqHyMAlRtYw/video.html&t heres the video on how to deploy node.js backend with postgres to DigitalOcean in great detail

  • @Dinko15
    @Dinko15 Před rokem

    Hey Stoic, Im getting a weird issue with my heroku on startup. Is there a way we can correspond ? Its related to my router, its not grabbing anything from the backend.

    • @Dinko15
      @Dinko15 Před rokem

      I swear im not a bot I just hated the google plus era of having your first and last name

  • @Jun-zq3bn
    @Jun-zq3bn Před rokem +1

    please do a video deploying on render now that heroku is no longer free

  • @wisammozalbat6170
    @wisammozalbat6170 Před 3 lety

    Hi, all my client folder just got replaced for a create-react-app new file

  • @bhavyachopra9973
    @bhavyachopra9973 Před 4 lety

    The local psql command could not be located. Can you let me know I tried changing the path

  • @user-mq6dn3bu4s
    @user-mq6dn3bu4s Před rokem +1

    Bro are you still alive ? Why you stopped posting pern ?!

  • @juilipotdar8664
    @juilipotdar8664 Před 3 lety

    Can you show how to deploy using GitHub? How to do continuous deployment while developing?

  • @ailleine9484
    @ailleine9484 Před 4 lety

    thank you so much for this series!! I've been following along since the to-do list and it's my intro to full stack, so I was very pleased to be able to be able to learn so much!
    I'm running into a problem @ the 25:00 mark re:clearing cache: when I restart my React app the database entries don't load, although I triple checked and should have completed the previous steps (in client I deleted node_modules/package-lock.json & ran npm install, didn't comment out window.location).
    console shows this error: JSON.parse: unexpected character at line 1 column 1 of the JSON data (e index.js:1, getTodos ListTodo.js:27). I haven't touched the component code besides shortening the URL cuz of the proxy & changing quotes to backticks--any idea what might be wrong?

    • @TheQuackLearner
      @TheQuackLearner  Před 4 lety

      Hi ailleine! Is it possible you can pass me your code on GitHub so I can take a closer look at the problem?

    • @aileenwu1362
      @aileenwu1362 Před 4 lety

      @@TheQuackLearner yes!! here it is: github.com/wua3/pern-todo

    • @TheQuackLearner
      @TheQuackLearner  Před 4 lety

      ​@@aileenwu1362 , so the reason the react app didn't work was that the proxy was not added to the package.json yet. I fixed the issue by adding the proxy (you can start at 22:12 to see how to it is done) and I clear the cache by first deleting the package-lock.json and node_modules, second installing the packages back in the react application, and third turning back on my react app. Hopefully, this helps your issue. Feel free to reply if you continue to face a problem.

    • @aileenwu1362
      @aileenwu1362 Před 4 lety

      @@TheQuackLearner yes! I had actually put the proxy into the root package.json and I understand now why it should be in the client one--thank you for your help!!

  • @andrewbateman2282
    @andrewbateman2282 Před 4 lety

    Great tutorial and code deployed OK. Just one question: when I enter a todo the list updates automatically but if I edit or delete a todo the list does not refresh itself - `window.location = "/"` is used after each operation, same as your code. I have to refresh to see the changes. Thanks.

    • @TheQuackLearner
      @TheQuackLearner  Před 4 lety +1

      Hey Andrew, is it possible you can pass me your github code so I can take a closer look?

    • @andrewbateman2282
      @andrewbateman2282 Před 4 lety +1

      @@TheQuackLearner Hi, thanks.
      github.com/AndrewJBateman/pern-stack-todo

    • @TheQuackLearner
      @TheQuackLearner  Před 4 lety +2

      ​ Andrew Bateman so the problem is that a response is not being sent back by the server. The window.location can not be executed until a server does a res.send or res.json is returned. In your edit and delete server routes (index.js file) I notice you comment out the res.json. I fixed the issue by adding it back. Hopefully, that fixed your issue. Feel free to ask more questions if that didn't help your case. Anyway, I really like the documentation you set up!

    • @andrewbateman2282
      @andrewbateman2282 Před 4 lety

      @@TheQuackLearner Thanks. It works now. Amazing, I was only looking in the client file for the problem and it was on the server side. Thanks againl

  • @stjepanvukelic2253
    @stjepanvukelic2253 Před 2 lety

    anyone knows why i get empty page when I open localhost:5000?

  • @sladky8268
    @sladky8268 Před 2 lety

    error SSL: certificate verify failed

  • @cerencetin936
    @cerencetin936 Před 3 lety +1

    For anyone who is getting a "Not Found" error in the console when they click on the Add button, I found that mine was due to SSL enforcement.
    I have added "ssl: { rejectUnauthorized: false }" in db.js within new Pool under the connectionString code. This has worked for me.
    So, it should be as below:
    const pool = new Pool({
    connectionString:
    process.env.NODE_ENV === "production" ? proConfig : devConfig,
    ssl: { rejectUnauthorized: false }
    });

  • @cocytus.o_o
    @cocytus.o_o Před 3 lety

    Hi, When the logs of my pern app says "no pg_hba.conf entry for host , user, database, SSL off".
    Could you please help me resolve the error?
    Thank you.

    • @CounterScroll
      @CounterScroll Před 3 lety

      I think I just had the same error as you and I fixed it.
      The issue is that the connection to the database is missing a parameter.
      You must add a second parameter after connectionString, in the Pool({}) which is:
      ssl: {
      rejectUnauthorized: false
      }
      It is shown here in the docs.
      devcenter.heroku.com/articles/heroku-postgresql#connecting-in-node-js

    • @timothywongej
      @timothywongej Před 3 lety

      @@CounterScroll hello! do you know if this has any security issues? I'm getting the same issue but not sure if this isthe only work around?

    • @CounterScroll
      @CounterScroll Před 3 lety

      @@timothywongej Honestly I have no clue! Security is something I know the least about.
      Under the section I linked, they say "Alternatively, you can omit the ssl configuration object if you specify the PGSSLMODE config var: heroku config:set PGSSLMODE=no-verify.". So that may be the only other option.

  • @vladodjuric3347
    @vladodjuric3347 Před 3 lety

    Is anybody else getting a timeout error when their app is deployed? My database is empty however whenever I try to add a new todo my request times out.

    • @leonseled
      @leonseled Před 3 lety

      Bit late but was facing the same issue and cause for my issue was that Heroku requires SSL. So in your db.js file add the SSL key. const prodConfig = {
      connectionString: process.env.DATABASE_URL, //heroku addon
      ssl: {
      rejectUnauthorized: false,
      },
      };

    • @henryli85
      @henryli85 Před 3 lety

      @@leonseled you are the MVP

    • @henryli85
      @henryli85 Před 3 lety

      devcenter.heroku.com/articles/heroku-postgresql#connecting-in-node-js
      had to use this documentation. Changed the const to client. I don't know why pool didn't work.
      const { Client } = require('pg');
      require("dotenv").config(); //using ENV variables in .env
      let client;
      const devConfig = `postgresql://${process.env.PG_USER}:${process.env.PG_PASSWORD}@${process.env.PG_HOST}:${process.env.PG_PORT}/${process.env.PG_DATABASE}`;
      if (process.env.NODE_ENV === "production"){
      client = new Client({
      connectionString: process.env.DATABASE_URL,
      ssl: {
      rejectUnauthorized: false
      }
      });
      } else{
      client = devConfig;
      }
      module.exports = client;

  • @bhargavgohil25
    @bhargavgohil25 Před 2 lety

    is Procfile neccesary ? or not ?

  • @worldwide6626
    @worldwide6626 Před rokem

    Make one on aws considering Heroku removed its free tier

  • @eazyvegas
    @eazyvegas Před 3 lety

    King

  • @MrPogi-lf5gz
    @MrPogi-lf5gz Před 4 lety +1

    Can you do this on DO?

    • @TheQuackLearner
      @TheQuackLearner  Před 4 lety

      Hi brigz, what does DO stand for?

    • @MrPogi-lf5gz
      @MrPogi-lf5gz Před 4 lety +1

      @@TheQuackLearner Digital Ocean.

    • @TheQuackLearner
      @TheQuackLearner  Před 4 lety

      @@MrPogi-lf5gz ah I see , unfortunately Digital Ocean and Heroku have there own way of deploying there code. Digital Ocean is a IAAS , so it actually provides you your own server; therefore, this usually results to more configuration. Perhaps this article can give you a good introduction => codeburst.io/ricky-figures-it-out-devops-deployment-using-express-postgres-and-digital-ocean-15c2d961340e . Good question

    • @MrPogi-lf5gz
      @MrPogi-lf5gz Před 4 lety +1

      @@TheQuackLearner thanks. Awesome channel by the way. Hope you keep adding contents into it!

  • @7308440
    @7308440 Před 3 lety +1

    MAKE SURE YOU ALSO ADD SSL TO YOUR CONFIG CODE!!!!
    if (process.env.NODE_ENV === 'production') {
    dbParams.connectionString = process.env.DATABASE_URL
    dbParams.ssl = {rejectUnauthorized: false}
    devcenter.heroku.com/articles/heroku-postgresql#connecting-in-node-js

    • @KahramanMustafa
      @KahramanMustafa Před 2 lety

      Thanks man, it works like a charm, that is the I am looking for. I have configured in the db.js, "proConfig" object.
      const proConfig = {
      connectionString: process.env.DATABASE_URL, // Heroku addons
      ssl: {
      rejectUnauthorized: false,
      }
      }

  • @skks837
    @skks837 Před 3 lety

    @The Stoic Programmer ur duscord server?

  • @zr60
    @zr60 Před 2 lety

    You don't have to pull out your entire server folder.....

  • @codedamn
    @codedamn Před 4 lety +3

    Hi Henry! I'm here from your fCC video. I have a proposal which you might find relevant. What's your email address? I cannot find it anywhere.

  • @arupde6320
    @arupde6320 Před rokem +1

    are you alive ??

  • @astkh4381
    @astkh4381 Před rokem

    thank you , but how your app understand is this porudction or not 16:18.And what is .env.NODE_ENV

  • @anyaecheebuka118
    @anyaecheebuka118 Před 3 lety

    I added authentication and I can't seem to register or login. Throws an error