Express.js & Node.js Course for Beginners – Full Tutorial




Learn how to develop a web app from scratch using Node.js, Express.js, PostgreSQL, and Bootstrap. Develop a landing page and a CRUD application collecting sales leads.

The code from this project is a good starting place for you to develop your own project.

💻Code: https://github.com/buzz-software/expressjs-mvp-landing-page

Course developed by Buzz Team. Check out their YouTube channel: https://www.youtube.com/channel/UCYG3_Qd8eOesMmvhjtA-iOw

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://medium.freecodecamp.org

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Original source


35 responses to “Express.js & Node.js Course for Beginners – Full Tutorial”

  1. in signup handle i'm getting this error after sbumit
    “““
    Cannot read property 'build' of undefined

    TypeError: Cannot read property 'build' of undefined

    at exports.signup (/media/jean/My Document/project/nodefirtsapp/myfirstapp/controllers/user.js:27:33)

    at Layer.handle [as handle_request] (/media/jean/My Document/project/nodefirtsapp/myfirstapp/node_modules/express/lib/router/layer.js:95:5)
    ““““

  2. At the part were we implement user login and sign up with passport js. My code gives me a done is not a function error. But it still submits the form to the database. And the successRedirect doesn't redirect it just keeps on loading

  3. Excellent video. I spent my entire Saturday and only got through 2/3rds of the video. I'm a newbie to Node.js and Express and was looking for a good framework to use for the #AVRSpy project I'm working on. Although I've opted for SQLite without Sequelizer for my project, I've been able to parallel your app with the smaller db. I truly appreciated the MVC approach you took with a basic Express generator app. Taking Sequelizer out of the picture has left me unsure how to utilize the "models" feature if I'm going to use SQLite though. Right now, I'm doing all of the work from the Controllers js files. Thanks again for a great video: I only had to hit pause and say 'WHAT DID HE JUST DO?' about 234 times.

  4. HELP NEEDED ASAP! :-

    XZ9:~/myapp$ sequelize db:migrate

    Sequelize CLI [Node: 10.15.0, CLI: 5.4.0, ORM: 5.7.4]

    ERROR: Error reading "config/config.js". Error: SyntaxError: Unexpected string

    Can anyone help me with this? Not a MacOS user so installed Postgresql separately in my Ubuntu system and made db from it. (Tried using Linuxbrew but couldn't succeed because of the same MacOS issue)

  5. People. HTML is easy. If you need a template engine use "handlebars". Stay away from bad things like "jade/pug" that force you to relearn html and waste time re-coding things that should be a simple "copy" and "paste".

  6. 21:20 When I run the npm start command, I get an error which says '$NODE_ENV was unexpected at this time.'. I think that the if statement isn't recognized correctly on my pc (windows) even though I coppied the exact code. If anyone knows why this happens, let me know!

  7. TypeError: req.flash is not a function
    at models.User.findOne.then.user (/home/dienigma/Learning/N/myapp/passport_setup.js:43:9)
    at tryCatcher (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/promise.js:694:18)
    at _drainQueueStep (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/async.js:138:12)
    at _drainQueue (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/async.js:131:9)
    at Async._drainQueues (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/async.js:147:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/dienigma/Learning/N/myapp/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate (timers.js:637:19)

  8. You can generate the migration and model from the command line if you installed sequelize-cli:
    Example:
    `sequelize model:generate –name Leads –attributes email:string`
    *Note:* Sequelize automatically generates the id, updatedAt and createdAt fields.

  9. what does "fi" means at the end of the start value in the packages.json. Also, i get an error
    if [[ $NODE_ENV == 'production' ]]; then node ./bin/www; else nodemon ./bin/www; fi

    ODE_ENV was unexpected at this time.

    m ERR! code ELIFECYCLE

    m ERR! errno 1

    m ERR! myapp@0.0.0 start: `if [[ $NODE_ENV == 'production' ]]; then node ./bin/www; else nodemon

    m ERR! Exit status 1

    m ERR!

    m ERR! Failed at the myapp@0.0.0 start script.

    m ERR! This is probably not a problem with npm. There is likely additional logging output above.

    m ERR! A complete log of this run can be found in:

  10. sequelize and express-session are deprecated, this is the message it return:
    sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators node_modules/sequelize/lib/sequelize.js:242:13
    express-session deprecated undefined resave option; provide resave option app.js:25:9
    express-session deprecated undefined saveUninitialized option; provide saveUninitialized option app.js:25:9

Leave a Reply