Join Daniel Khan for an in-depth discussion in this video Creating a server with Express, part of Building a Website with Node.js and Express.js.
- [Narrator] In the previous video we created a web server…with nothing but core functionality of Node.js.…Now let's redo the same with Express.…While we are doing that please bear with me,…we will cover each detail in depth later.…This is just to show you the channel concept.…First let's install Express.js…To properly install a module,…you should first create a so called package.json file.…I'm still in my Bab server folder here and now I will…just create for simplicity reasons…a new file index.js.…
And to initialize this directory to be used with npm…I will run npm init - y,…which will create a very generic package.json file…which we see it here,…very simple, nothing much happening here.…Now let's actually install Express.…I do this by running npm install…- - save express.…
And this will pull down Express for me and as we see here…it will add it to the dependencies in a package.json file…and also this now created a package-lock.json file…which contains all dependencies…of Express itself.…Next, let's open this index.js file and let's bring…
- Creating a server with Express and pure Node.js
- Handling errors in Express
- Creating routes
- Using templates
- Working with the Pug template engine
- Implementing the site structure and logic
- Working with conditionals
- Dealing with POST requests
- Sanitizing user inputs and handling form errors
Skill Level Beginner
What you should know1m 40s
1. Getting Started
2. Express Basics
3. Getting Started with Our Project
4. Getting Started with Templates
5. Implementing the Site Structure and Logic
6. Handling Form Data
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.