Join Daniel Khan for an in-depth discussion in this video Working with environments, part of Building a Website with Node.js and Express.js.
- [Instructor] Throughout it's development cycle…an application needs to run in different environments.…This is often something like development, testing…and production and often the configuration…and the way we expect the application to run differs.…Like in development, you will most probably…want to log everything and don't do any caching.…While in testing, you'll only want to log fatal errors…because you don't want to clutter your testing output.…When you're running in production, you want to log all…basic information and of course errors, as well.…
Of course there you want to cache because…it gives you a better application performance.…Node.js environments are set…by environment variable NODE_ENV.…As you see here, I'm exporting this variable with the value…production and when I then run my application,…it will run in production mode.…You can also do this as one liners by simply setting this…variable and then calling NODE_ENV.…Of course, this also works if you use…npm to start your application.…
Express is aware of this environment variable…
- 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.