Project Setup - Node.js/Express/MongoDB Course #1

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024
  • In this video we will be setting up the base of our project by:
    1. Setting up Express
    2. Hooking up MongoDB
    3. Setting up local ENV variables
    4. Creating a base layout HTML file
    5. Setting up our MVC folder structure
    MongoDB Atlas:
    mbsy.co/mongod....
    How To Install Node.js:
    • Your First Node.js Web...
    How To Install MongoDB:
    • How To Install MongoDB...
    Learn Git In 20 Minutes:
    • Learn Git in 20 Minutes
    Code For This Video:
    github.com/Web...
    Previous Video:
    • MVC Explained in 4 Min...
    Next Video:
    • Author's Index/Create/...
    Playlist:
    • Full Stack Web Develop...
    Twitter:
    / devsimplified
    GitHub:
    github.com/Web...
    CodePen:
    codepen.io/Web...
    #Node.js #FullStack #MongoDB

Комментарии • 672

  • @AhSoh7091
    @AhSoh7091 5 лет назад +531

    to those error
    src.toString().split(NEWLINE).forEach(function (line, idx) {
    ^
    TypeError: Cannot read property 'toString' of undefined
    try it require('dotenv').config();
    this works for me ...

    • @WebDevSimplified
      @WebDevSimplified  5 лет назад +54

      Thanks for posting this fix.

    • @ih4722
      @ih4722 5 лет назад +2

      Thanks worked with me as well.

    • @kmparkhu
      @kmparkhu 5 лет назад

      Thanks, this worked for me too.

    • @jasonmckay2769
      @jasonmckay2769 5 лет назад

      Thanks mate! Worked like a charm.

    • @jasonmckay2769
      @jasonmckay2769 5 лет назад +32

      if (process.env.NODE_ENV !== 'production') {
      require('dotenv').config();
      }
      place that at the top of your server.js

  • @humans-are-shite
    @humans-are-shite 4 года назад +29

    You described in 30 minutes what my professor couldn't clear describe in 3 weeks! Awesome!

    • @Herculesprods
      @Herculesprods Год назад +1

      That's why the professor didn't have a real job with a suitable salary.💸
      Real teachers🧑‍🏫are people that are competent in the field they're trying to teach and had real experience & knowledge in it.
      The solution to this worldwide🗺problem is to teach all the needed knowledge by yourself.
      💪Use the power of the internet.

    • @alice13eth
      @alice13eth 11 месяцев назад

      Better than Meta explained it

  • @brianwkinyua
    @brianwkinyua 3 года назад +12

    Awesome series! I love that you explain in detail why you are doing what you are doing in every step, including explaining the errors you will get by not taking the step correctly.
    Many people do not do that. Thank you for doing that.

  • @dotanmezushan6320
    @dotanmezushan6320 3 года назад +8

    At server.js I had to add
    if (process.env.NODE_ENV !== 'production') {
    require('dotenv').config();
    }
    rather
    if (process.env.NODE_ENV !== 'production') {
    require('dotenv').load()
    }
    now I'm connected to mongoose and get "Connected to Mongoose"
    Thanks Kyle you are my best teacher !

  • @possibleneat5026
    @possibleneat5026 5 лет назад +16

    The world need more people like you, im decided to be like you someday teachinh others for better wordl

    • @WebDevSimplified
      @WebDevSimplified  5 лет назад +5

      Thank you! That really means a lot to me. I am sure that you will be an amazing teacher one day!

  • @rifatsalmanabir3352
    @rifatsalmanabir3352 5 лет назад +22

    Just wow. Amazing amazing amazing! You simply explain complex things. Eagerly waited for the entire series including session, cookies, authentication, server side and client side validation on Express.

  • @mr.webdev3700
    @mr.webdev3700 5 лет назад +74

    OH YEAHHH! Who else is pumped for this series? 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥

  • @JUnderwoodViolin
    @JUnderwoodViolin 4 года назад +14

    I feel like I could watch this video 50 times over and just keep learning something new, amazing job, Kyle!

  • @theDarweesh
    @theDarweesh 4 года назад +62

    Great work mate #WDS, Keep it up
    If you're facing an error with dotenv at 16:40, change require('dotenv').load() to require('dotenv').config()

  • @agnieszkalewandowska9896
    @agnieszkalewandowska9896 4 года назад +5

    Learning to build websites has never been so much easy and fun. Thank you, Kyle! :D

  • @LucasErkana
    @LucasErkana 10 месяцев назад +1

    Kyle your the GOAT. Absolutely amazing and well detailed.

  • @MHY-bu1hy
    @MHY-bu1hy 7 месяцев назад +2

    just a small note in this fantastic lecture! I think it is in Feb 2024 require('dotenv').config() instead of .load() or .parse() at timestamp 16:35

  • @DevCops
    @DevCops 5 лет назад +140

    Just another Error Correction for everyone, the .load() has been removed from dotenv , rather .config() has replaced it.

    • @yellemonster
      @yellemonster 4 года назад +9

      You just saved me! Thank you

    • @rogercolque
      @rogercolque 4 года назад +7

      thks u save me minutes

    • @deepak10995
      @deepak10995 4 года назад +5

      really bro...i've been searching for this since 2 hrs...trying to remove the error...thanks alot bro

    • @hanmyzone
      @hanmyzone 3 года назад +1

      @@deepak10995 Thank you!

    • @youssefabdullah3187
      @youssefabdullah3187 3 года назад +2

      oh Thanks from 2021

  • @beksaylor
    @beksaylor Год назад +1

    @Kyle you are the GOAT of dev education. I don't know how you do it but you put everything so clearly together. I even understand Express now as well because of another on of your videos. I would love your javascript , but I'm a broke student...But I loved your Learn CSS course. Thanks for all the great content!!

  • @mcvgs1780
    @mcvgs1780 4 года назад +1

    I came from Laravel so all the MVC stuff was easy to understand and now I'm starting to learn web development in node. Thanks Kyle

  • @gello95
    @gello95 2 года назад

    Just came from the videos on how the backend works, what is REST, & MVC explained. I’m loving how well put these explanations are!

  • @vijayraghunathkm197
    @vijayraghunathkm197 3 года назад

    Following you for the past month.. wat a mannnnn you are.. HATS OFF

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hey Vijay! Are you a 2021-graduate? Would you be interested in exploring job opportunities in web development currently?

  • @jamesboone4474
    @jamesboone4474 3 года назад +22

    for anyone doing this getting an error with "git push heroku master"
    "error: src refspec master does not match any
    error: failed to push some refs to"
    you need to change the command to "git push heroku main"

    • @theenlightened5786
      @theenlightened5786 3 года назад

      Thank you my friend.

    • @hootmx198
      @hootmx198 3 года назад

      ^ This will fix it. Github changed the primary branch name from master to main recently so that is why.

    • @dwayneneckles
      @dwayneneckles 3 года назад

      Thank you James.

    • @kritmok1875
      @kritmok1875 2 года назад

      Thanks a lot!

    • @mys8091
      @mys8091 2 года назад

      OMG i love you

  • @o1techacademy
    @o1techacademy 2 года назад

    You finished me with this awesome video.
    I have to re watch it again and again until I absolve all of its value.

  • @dottorcosmic
    @dottorcosmic 3 месяца назад

    Learned more with you in 5 mins than in a week with everyone else

  • @tphantom581
    @tphantom581 2 года назад +1

    That's great Kyle!, Thank you!
    For those who gets error with 'dotenv' dependencies from heroku --tail.
    Try to move "dotenv" from "devDependencies" into "dependencies" in package.json.

  • @BluePhoenixGames1
    @BluePhoenixGames1 5 лет назад +3

    Really well put together! It's nice with a series too that combine several technologies into a more complete project

  • @ricardomlourenco
    @ricardomlourenco 3 года назад

    Thank you very much dude! Instead of going to the tutorial hell, I'm learning nodejs with your pragmatic and very well explained courses! Thank you!

  • @aniruddha414
    @aniruddha414 4 года назад +1

    Thank you so much. I've been learning a lot throught your videos. Also the free options for hosting are a great bonus. Really appreciate all your content. Thank you again!

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hello Aniruddha! Are you a 2021-passout and looking for job opportunities in web development currently?

  • @sauravkumarsonu829
    @sauravkumarsonu829 3 года назад

    I have been a great fear about full stack development and you just made it's so easy 🙏🙏🙏

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hey Saurav! Are you a fresher in web development and open to job opportunities in full-stack development?

  • @marekbeck9012
    @marekbeck9012 3 года назад

    One of my favorite moments in the videos is when I spot an error and I'm waiting to see you get stuck and frustrated (like I always do), but then you casually fix it in 2 seconds :D

  • @parasarora5869
    @parasarora5869 5 лет назад +3

    amazing video. I really like how you define the production part. That really clears the confusion when it comes to deployment. Thank you very much 😃

    • @WebDevSimplified
      @WebDevSimplified  5 лет назад +8

      I'm glad you enjoyed it. I know when I was first learning web development the process of deployment and what to do for production really confused me, so I wanted to cover these topics at the very beginning of the project.

    • @parasarora5869
      @parasarora5869 5 лет назад

      @@WebDevSimplified same problem i am facing but thanks to you i am more confident 😄

  • @JasonLayton
    @JasonLayton 4 года назад +1

    I have been able to follow along with you, but I don't really understand it. Is this a good way to learn? Will it eventually start to make sense?

  • @aubz9924
    @aubz9924 4 года назад +3

    For those for whom the `require('dotenv').parse()` related error persists despite changing it to `require('dotenv').config()`, try deleting your .env file and creating it again - this worked for me.

    • @miralpankhania3983
      @miralpankhania3983 4 года назад

      It also worked for me!!!! Almost tried everything and at last tried this solution and it actually worked. Thank you so much. however i did not understand the reason.

    • @w0zz0r
      @w0zz0r 4 года назад

      Thank you so much! Do you know why this works?

    • @kaustubhdubey2809
      @kaustubhdubey2809 3 года назад

      Thanks man really appreciated it!!!!

  • @angiedale3647
    @angiedale3647 5 лет назад +2

    simply amazed of the simplicity and your explanation

  • @Loys2020
    @Loys2020 2 года назад

    Awesome video, bro! You go straight to the point. Very clean code and minimal code to deploy the application, it's a really good first video tutorial! Thank you a lot.

  • @robertpainter9820
    @robertpainter9820 2 года назад +1

    Thanks for this. Just followed this all the way through and it's still applicable bar a few small changes that were fairly easy to remedy. I see the require('dotenv').config() is in the comments already. The mongo db atlas set up has changed ... it asked for an IP address but you can put 0.0.0.0/0 and create a cluster. Then when you connect you get the "connect to app" box shown in the video from which you can grab the connection string.

  • @randolphschreiner4479
    @randolphschreiner4479 3 года назад

    Learned tons, still relevant, and operational in 2021.

  • @o1techacademy
    @o1techacademy 2 года назад

    Thank you very much Kyle. You tutorials keep making me a better developer.

  • @mdzikrullah9575
    @mdzikrullah9575 3 года назад +2

    After pasting the password its still showing Application error for me..Please someone help me

  • @chrisl2773
    @chrisl2773 2 года назад +4

    If you're getting an error when loading up MongooseDB that says "MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017" - then go to your .env file and change it from "localhost" to "127.0.0.1" and it should fix the issue.

  • @MrFiendyBob
    @MrFiendyBob 3 года назад +2

    Error: No default engine was specified and no extension was provided. Getting this error and im very confused. Trying to make a login in page but data is stored in MongoDB

  • @navdeeppaliwal3292
    @navdeeppaliwal3292 4 года назад

    Very straight forward tutorials nothing timepass must recommended.

  • @mykalimba
    @mykalimba 4 года назад +1

    I just realized that you sound a bit like Jared in HBO's Silicon Valley, as if he took on the role of coding, like Dinesh and Gilfoyle. I can't unhear it!

  • @baraal-jawarneh3852
    @baraal-jawarneh3852 3 года назад

    You have the best way to explain each step, keep going 💜

  • @immortal7167
    @immortal7167 3 года назад +4

    For anyone facing issues with Heroku deployment, check the Error Log via the CLI using the following command ~ heroku logs --tail .
    Step 1 : Check Your DATABASE_URL, it would be correct but just be sure,
    Step 2 : Check your start script as Heroku runs in a production environment by default so it does not install the dev dependencies.
    make sure the following is the way your start script is setup.
    "scripts": {
    "start": "node server.js",
    "DevStart" : "nodemon server.js"
    }
    Step 3 : is the error log says something like
    2020-12-04T08:35:25.386313+00:00 app[web.1]: throw err;
    2020-12-04T08:35:25.386314+00:00 app[web.1]: ^
    2020-12-04T08:35:25.386314+00:00 app[web.1]:
    2020-12-04T08:35:25.386314+00:00 app[web.1]: Error: Cannot find module 'mongoose'
    Just Copy these from devDependencies to dependencies in your package.json file.
    I made this comment in hopes to help you avoid the time it took me to debug this issue.

    • @devviz
      @devviz 2 года назад

      very detailed solution, thanks man👌🏻

    • @riyakumari8377
      @riyakumari8377 Год назад

      can u tell what should be the DATABASE_URI is it from mongodb atlas url?

  • @leg3ndtariq
    @leg3ndtariq 4 года назад +3

    I have a question, at 8:15 you are writing :
    🔰
    app.use('/', indexRouter ); what is this slash purpose here ? We already said in the index file in router folder that if any request comes from / folder then send "Hello world".
    🔰
    then why do we need to write again "/" in app.use method.. what is it actually doing here ?

  • @DavidCervantes.
    @DavidCervantes. 4 года назад +1

    Incredible course! Greetings from Argentina.

  • @rushabhnaik6806
    @rushabhnaik6806 4 года назад

    Too good man!!..Simply amazing
    Understood each and every step!

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hey Rushabh! Have you completed many tutorials in web dev such as this one? Are you a 2021-passout and open to job opportunities in web development currently?

  • @CL-ki7se
    @CL-ki7se 2 года назад

    thanks big time man.
    really straightforward explaination and I actually learned something.

  • @balloney2175
    @balloney2175 Год назад

    I've done heroku years back then I forgot... wasted skill. Many thanks for your video. I envy your so cool hair.

  • @Will-le8yj
    @Will-le8yj 2 года назад +1

    23:04 "and thats all it takes" LOL he explained in 23 mins but i took 2 hours even with his tutorial lmfao

  • @cj-lc4vk
    @cj-lc4vk 4 года назад +3

    Why does heroku still showing error even though i connected it to mongodb atlas? Please help

  • @lloyd_jvr9152
    @lloyd_jvr9152 4 года назад +6

    Error: 'The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.'
    Fix: require('dotenv').config({ path: '.env' })

    • @houssemkhi5036
      @houssemkhi5036 4 года назад +2

      i got the same error but even i ve replaced it the error still occuring
      what should i do

    • @houssemkhi5036
      @houssemkhi5036 4 года назад +1

      it hasn t been fixed for me

    • @palaktiwari4376
      @palaktiwari4376 4 года назад

      @@houssemkhi5036 in place of DATABASE_URL use mongodb://localhost/mybry

    • @yosipipi
      @yosipipi 3 года назад +1

      make sure your .env file name is '.env' and not just 'env'
      (dot in the beginning)

  • @adarmaori9853
    @adarmaori9853 3 года назад +2

    Do you recommend using this folder as a boilerplate server for every website? I'm trying to think about why not but you'd probably know

  • @piyush4338
    @piyush4338 3 года назад +1

    For those who are unable to host on Heroku instead of following all the steps.
    Try moving dotenv to dependencies from dev dependencies by running the command --> npm install dotenv --save-prod
    Hopes this will help!!

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hey Piyush! Thanks for the tip! Are you a 2021-passout and interested to explore job opportunities in web development currently ?

    • @shristi9149
      @shristi9149 2 года назад

      Hi Piyush, I did as you've mentioned but it still doesn't work ... can you tell me why..?

    • @riyakumari8377
      @riyakumari8377 Год назад

      @@shristi9149 do u find any solution?

  • @MAALTECH
    @MAALTECH 2 года назад

    Got it working. had to add .config() as suggested but also had to grant the proper permissions on installation then received the generated URL from compass. Thank you. Ensure Proper Permissions if compass not generate code under local (left sidebar).
    Upate .env file DATABASE_URL= PATH_TO_MONGO_COMPASS_GENERATED_CODE.

  • @AnkurSingh-mk9rc
    @AnkurSingh-mk9rc 4 года назад +1

    If you are having error about connecting to mongoose then open window power shell(admin) , type mongod , and then save the code , it would work

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hello Ankur! Are you a 2021-passout and looking out for full-time positions in web development?

  • @stevendornan7979
    @stevendornan7979 5 лет назад

    Amazing tutorial, very clear at explaining things. I Just subbed!

  • @danielmamnev6836
    @danielmamnev6836 4 года назад +2

    I am getting an Internal Server Error on my heroku app and I think it might have something to do with my mongodb. Everything works fine locally at this point but on heroku it does not. I think it may be because atlas cluster connection string is requiring a dbname and this video automatically shows the the dbname to be test. What should i do? I tried making the dbname 'test' in the connection string and it didnt help. Any help would be appreciated - thank you.

  • @aristotleanderson930
    @aristotleanderson930 4 года назад

    Ty for making web dev simple!

  • @bountyhunter96
    @bountyhunter96 11 месяцев назад +2

    It's impossible to start a Heroku App without credit card right?

  • @alaindimabuyo
    @alaindimabuyo 5 лет назад +1

    these are the types of videos that i want to watch

  • @davidschwartz2485
    @davidschwartz2485 4 года назад +5

    Everything is great until i try to deploy to heroku. i keep getting "application error". i have gone over everything 3 times and built the database on cloud atlas (i also dont have the option to see a free tier). frustrated because everything else is working perfectly. its a great set of videos. any help would be great if possible

    • @electrotsmishar
      @electrotsmishar 4 года назад

      actually you need to set the environment variables

  • @stachowi
    @stachowi 5 лет назад

    amazing tutorial, great job explaining the details. Just subbed!

  • @DevCops
    @DevCops 5 лет назад +1

    Mann I just know one thing You're super Awesome!!!!!

  • @Alexander-re8vz
    @Alexander-re8vz 3 года назад +1

    I am having an error on the its not working. It says it cant find an index folder

    • @growthhacking9126
      @growthhacking9126 3 года назад

      Mine too same problem

    • @Alexander-re8vz
      @Alexander-re8vz 3 года назад

      @@growthhacking9126 I got the solution go to web devs github and just copy paste the code then it will work I dont know why its like that

  • @Sammorris207
    @Sammorris207 3 года назад

    thanks kyle for these videos!

  • @brecoldyls
    @brecoldyls 4 года назад +6

    These videos are awesome! I have one question though, my tags don't autoclose like yours seem to do. How did you get that to work? Thank you!

    • @electrotsmishar
      @electrotsmishar 4 года назад +4

      He used an extension in vscode called "EJS Language Support"

  • @biblioteca.antarctica
    @biblioteca.antarctica 4 года назад +2

    I need this project but with MySQL.......can you help ?????

  • @Javascript1
    @Javascript1 3 года назад

    GENIUS!! thank for this video

  • @rogercolque
    @rogercolque 4 года назад +3

    on mongoose connect :
    .set("useCreateIndex", true)
    .connect(CONFIG.DB, { useUnifiedTopology: true,useNewUrlParser: true })

    • @tejasjoshi1907
      @tejasjoshi1907 4 года назад +1

      How to use this , I mean in which file I have to put this?

  • @Misfittykitty
    @Misfittykitty 2 года назад +1

    I'm at a standstill...as in the rest api project I am now getting this error and can't proceed. Can anyone offer advice? Thanks!
    MongooseServerSelectionError: connect ECONNREFUSED ::1:27017

  • @JeffThePoustman
    @JeffThePoustman 3 года назад

    Word to others: I struggled for a long time to deploy this app to Heroku. Eventually I realized that no buildpack was in use. To find if you are in this situation, run:
    >heroku buildpacks
    To use the official buildpack, run:
    >heroku buildpacks:set heroku/nodejs
    Once I did this, the app worked as expected.

    • @JustCoNa
      @JustCoNa 2 года назад

      Thank you so much dude, could not figure out why it wasn't pushing for the life of me.

  • @SR-we1vl
    @SR-we1vl 4 года назад

    Absolutely Great!

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hey Saurav! Are you a 2021-passout and open to job opportunities in web development currently?

  • @johnparungao1354
    @johnparungao1354 4 года назад

    First video watched, instant sub :D

  • @praff5308
    @praff5308 4 года назад

    Big fan of your content WDS :thumbsup:
    Keep it up!

  • @zambchi
    @zambchi 2 месяца назад

    Personal Use
    Initialize Server 0:00 - 5:30
    Initialize Controller/Index/Route 5:30 - 9:30
    Initialize View 9:30 - 12:00
    Initialize Model/Database 12:00 - 16:52
    Initialize Git/Version Control 16:52 - 19:13

  • @Orenrs
    @Orenrs 2 года назад +2

    16:46 - Not getting the console log of "Connected to Mongoose" - any advice?

  • @tag_of_frank
    @tag_of_frank 2 года назад +1

    Can you explain why we use the body variable at 11:15 where is body variable defined in expressLayouts? Because if we are sending like json we would put the json variable name but body is not explicitly defined anywhere

  • @efisirify
    @efisirify 2 года назад

    Hey Kyle. Thank you so much for this great tutorial. Is ejs is solving the same issues the font end framework (react, angular, etc) solve ?
    Do you have a full stack tutorial corporate node.js with react for the front?
    Thanks!

  • @Ulyzses
    @Ulyzses 4 года назад +1

    Might sound like a stupid question but how do you already have Github in the Explorer upon start up of VSC?

  • @robinsongarcia7217
    @robinsongarcia7217 4 года назад +3

    Hello I am having trouble, my mongo wont connect error message: UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017

    • @narenhemnani7393
      @narenhemnani7393 4 года назад

      I faced same issue the problem is that the MongoDB server is not running. So run this command on your terminal.
      sudo systemctl start mongod
      then run mongo on terminal

  • @beedleChompz44
    @beedleChompz44 3 года назад

    supremely helpful

  • @SharkMochi
    @SharkMochi 11 месяцев назад +1

    How can I hook this up to vercel instead of heroku? Heroku is no longer free.

  • @axelthescarecrow
    @axelthescarecrow 2 года назад +3

    Make sure your DATABASE_URL is 0.0.0.0 instead of localhost if you are having issues!

  • @surfinbird71
    @surfinbird71 4 года назад +4

    I finally got it to work on Heroku guys!!... I was getting the `openUri()` must be a string, got "undefined" error. I want to share some key pieces of code with you. On server.js:
    if(process.env.NODE_ENV !== 'production') {
    require('dotenv').config({ path: '.env' })
    }
    also:
    mongoose.connect(process.env.DATABASE_URL, {useUnifiedTopology: true, useNewUrlParser: true, useCreateIndex : true})
    My .env file in VSCode is still set to: DATABASE_URL=mongodb://localhost/mybrary
    I signed up for Heroku and installed the Heroku CLI. I created an instance in Heroku and set the password as Kyle says near the end of the video, but still got the error. I added my code above, did a couple of git pushes and somehow I ended up with a SECOND instance on Heroku. That second instance ,which I did not even know was there, did not have the password set. So once again, I set the password as Kyle said and BOOOOOMM. It worked.
    Make sure you set the password on the right instance in Heroku.

    • @emashno5
      @emashno5 4 года назад +1

      Super! Thanks Man this helped me get through although im stil getting promise issues and unhandled errors i think this is enough for me to go on with the tutorial thanks again.

    • @rivasjon000
      @rivasjon000 4 года назад +1

      Absolute genius ! thanks for the help

  • @DipendraTamangNepali
    @DipendraTamangNepali 4 года назад +2

    Here i have problem
    during the connection
    mongodb+srv://user:@cluster0-odq2w.mongodb.net/?retryWrites=true&w=majority
    what should i need to write the there is n't anything i tried a lot but it doesnot load on heruko app

    • @jonathanbenny1818
      @jonathanbenny1818 4 года назад +1

      I have the same problem, found a fix for that?

    • @barotube24
      @barotube24 4 года назад

      that is the exact issue i have right now
      i am curious if you solved it

    • @dangeddes855
      @dangeddes855 4 года назад

      @@barotube24 anyone solved this?

    • @ParadoxWorks
      @ParadoxWorks 4 года назад

      @@dangeddes855 The is what you have set in .env file!

  • @JoshuaWhitney
    @JoshuaWhitney 4 года назад +3

    Hey man this is an awesome video! Thank you! I seem to be having an issue with the express-layouts part. It won't render the main layout.ejs only the index.ejs. Going off the express layouts docs I even tried specifying a specific layout to use with no luck. My file structure and setup is identical to yours. Any ideas? I don't know what I'm missing.

    • @v.michaelangelopaster943
      @v.michaelangelopaster943 4 года назад

      I'm also having problem with this. Does any can solve this?

    • @lubkajarken3386
      @lubkajarken3386 4 года назад

      @@v.michaelangelopaster943 You need to download extension EJS language support

  • @Heading370
    @Heading370 4 года назад +1

    How can I do some exceptions for the ejs-layouts? To either use another layout file or to just render a html file?

  • @devrxt10
    @devrxt10 4 года назад

    Simply Great

  • @sevdaamini9430
    @sevdaamini9430 3 года назад +1

    parse() did not work for me so I used config() and worked. :)

  • @liondeluxe3834
    @liondeluxe3834 4 года назад +1

    Am I the only one that feels like learning Node.js with the main modules feels like learning a new language

  • @daffarozano9177
    @daffarozano9177 3 года назад +1

    failed to lookup view "index" in views directory :(

    • @emanuelpalazon6508
      @emanuelpalazon6508 3 года назад

      hey!, i was getting the same error, try on server.js line 7 this app.set('views', __dirname + '/views') the '/" on views fixed my problem

  • @leahj6214
    @leahj6214 4 года назад

    Enjoying this course so far--really helping to clear some things up for me. Just out of curiosity--is there a reason you're using EJS over Handlebars? I'm in a boot camp and they're teaching us Handlebars so I was just wondering the difference/why you picked that one. Thanks!

    • @WebDevSimplified
      @WebDevSimplified  4 года назад +1

      I choose EJS since I think it is most similar to HTML so it would be most familiar to people that have never used a templating language before. You can use whichever language you prefer.

    • @leahj6214
      @leahj6214 4 года назад

      @@WebDevSimplified Thanks for the clarification!

  • @vishalwaghmare3130
    @vishalwaghmare3130 3 года назад

    I am doing the exact stuff...but still app is not working.!
    Is it because I am having my app-directory as a subdirectory in my repo? So shall I take my app-directory to some independent repo?

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hello Vishal, have you created many projects in web development? Would you be interested in exploring job opportunities in web development currently ?

  • @nathulkumar3368
    @nathulkumar3368 4 года назад +4

    What should be provided instead of in mongodb atlas connection string? Please help..

    • @JenniferStewart100
      @JenniferStewart100 3 года назад +1

      just delete that part... it will work without it

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      Hello Athul! Are you a fresher in web development - 2021passout? Are you looking for job opportunities in development currently?

    • @nathulkumar3368
      @nathulkumar3368 3 года назад

      @@shivanigaddagimath2143 I am 2022 batch

    • @shivanigaddagimath2143
      @shivanigaddagimath2143 3 года назад

      @@nathulkumar3368 I see. If you are open to full-time job opportunities or if you have seniors who are looking for an opportunity in web development, you can connect with me on linkedin to know more about this opportunity. Find my LinkedIn URL on my channel.

    • @nathulkumar3368
      @nathulkumar3368 3 года назад

      @@shivanigaddagimath2143 Sure

  • @popodip3471
    @popodip3471 3 года назад

    Use main instead of master if you have problems with the heroku part

  • @danielxie4636
    @danielxie4636 3 года назад

    Why no need to configue the mongodb atlas now? after I push the main to heroku, everything works well for me, the app can be accessed with no errors?

  • @bimbabbli1360
    @bimbabbli1360 4 месяца назад

    Im not in need for my app to be accesable on the internet, I just need to be able to run it to show my teacher it. Do i still need the heroku part or can i ignore it. Very helpfull series thx!

  • @isdamful
    @isdamful 4 года назад

    Hey man just curious you are not using any semicolons, how did you setup your environment for this?

  • @resolutionAgha
    @resolutionAgha 5 лет назад

    great and simple, thank you so much

  • @itidargar4591
    @itidargar4591 3 года назад +1

    An error kept popping in vs code console - "mongodb-connect-econnrefused-127-0-0-127017" // to resolve this, use reveal var link(used in heroku) --> copy-paste it in DATABASE_URL of .env file in vscode project.
    PS: this connects mongodb atlas with our project

  • @manishverma5261
    @manishverma5261 2 года назад

    Hello Kyle, please can you do a nodejs chat server for real-time chat. You explain things in such a easier way.... respect

  • @brightfuture2174
    @brightfuture2174 3 года назад

    We need tutorial like this like water