Learn how to implement needed middleware for client-to-server communication and data exchange.
- [Instructor] Now we'll be implementing Middleware … for express.js and we'll add CORS configuration … so that we can make requests form our client. … Open up a new terminal window, … so that we can install the CORS package … and a few other ones. … We'll say npm install, … we'll say cors and morgan … and save that to your dev dependencies, … and then open up a new terminal window … and say npm install. … This time it'll be body parser … and save to your main dependencies. … Then back over in your dev server. … Lets create another folder called config. … Then create a file on there called env.js, … and so lets import express. … Then we'll also import morgan, … the one we just installed … and then finally cors. … Our creative function here for setting the environment, … called set environment … and it takes in the express app … and then I'll have two functions down here … one for setting the development environment. … This will be setDevEnv and then setProdEnv … and they both take in the express app …
- Single-page applications and Vue.js
- Preparing your development environment
- Creating a Vue.js application
- Using the Vue.js router
- Building a RESTful back-end API with Node.js and Express.js
- Connecting to MongoDB
- Validating and managing a user session
- Connecting Vue.js to a back-end server
Skill Level Intermediate
1. Getting to Know the MEVN Stack
2. Preparing Your Development Environment
3. Vue.js Core Concepts
4. Building a RESTful Back-End API with Node.js and Express.js
Check HTTP status codes3m 17s
5. Connecting Your Application to MongoDB
6. User Authentication, JWTs, and Session Management
7. Finalizing Your Application
- 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.