The Heroku deployment server is missing some of the necessary environment variables for the application. Scott demonstrates how to configure the server for the correct environment and database URI.
(flute music)…- All right, so we're almost there.…I'm just showing you through all the stuff.…I don't want to just be like, "Here's how to do it!"…and then you forget how to do it.…I want you to see these problems, so.…And how to resolve them, great.…So now we got that.…Can anybody think of anything else that we might need?…It's, like, one big one.…A huge one.…All right, maybe I'll just show you.…Let me stop this.…
And, now, let me try to run this API again.…Now, I'm just going to run it locally.…Let's see what happens.…Boom.…What's that?…Yeah, no Mongo.…We didn't tell Heroku that we wanted Mongo.…It's going to try to connect to some database.…And, we also don't have our production database URL.…All right, if we go look in our app,…there is no production database.…There's production on JS but there's no db dot,…there's nothing here.…
So, it will just throw an error inside a server.js,…it was going to do config.db.url,…there is no config.db in production.js.…So this would just actually just error out,…it would like, cannot read, .url is undefined.…
This course was created by Frontend Masters. It was originally released on 12/30/2015. We're pleased to host this training in our library.
- Executing Node.js
- Using Express
- What is middleware?
- Testing in Node.js
- Using Mongo with Node.js
- Data modeling
- Querying data with Mongoose
- Identifying sensitive routes
- Configuring the deployment
Skill Level Intermediate
Building a Slack Bot with Node.js Microserviceswith Daniel Khan2h 9m Intermediate
Building APIs Using Hapi in Node.jswith Kirsten Hunter2h 23m Intermediate
2. REST APIs
5. Organization and Configuration
7. Data Modeling
10. Securing Routes
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.