Explore the Express.js example. Learn about library use, server setup, and mongo interaction. Additionally, learn about static endpoints for a "Hello world" message and the entry point for the application.
- [Instructor] Now let's start out with the node API server.…We'll be using Express and the MongoDB modules,…so the first piece is to import the library…needed to set up the code.…The code for this module is in the exercise files folder…for the video.…This is a skeleton we'll build on throughout the chapter…until we've got a fully functional Express application.…I've organized this code to be as accessible as possible.…The first section at the top, is the database setup.…We're using the Mongo client,…provided by the MongoDB Driver.…
A Mongo URL starts with MongoDB,…and what we have here is a URL…for the test database on localhost.…We'll be working with the collection we set up earlier,…quotes, and we'll get to that piece shortly.…There are also a couple of variables here.…Quotes is going to be a pointer to the collection…in our database and Top Quote will be used…to track the largest index in the database.…The next piece is the Express setup.…We're setting up an Express app,…which will be used to control all the HTTP interaction…
- Why become a polyglot programmer?
- Exploring Node.js, Python, Perl, and Ruby code
- Building on prior knowledge to learn new programming languages
- Learning API read and write functionality in Node.js, Python, Perl, and Ruby
- Implementing API functionality in Node.js, Python, Perl, and Ruby
Skill Level Intermediate
Building APIs Using Hapi in Node.jswith Kirsten Hunter2h 23m Intermediate
1. Becoming a Polyglot
Next steps1m 19s
- 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.