In this video, Emmanuel Henri adds the four endpoints needed to get your API started. He adds the GET, POST, PUT and DELETE calls to the server.
- [Instructor] Any application, back end or front end…needs routes in order to be able to call a URL…and get something back in a web application.…You can call a route and go to a specific page…or you can also use routes to define…your endpoints in an application.…We'll start working on end points.…And we'll also start using postman…to test our end points are working properly.…So let's get to it.…So the first thing I want you to do…is go inside of our routes…and we're already inside of it…if you don't have it open,…it's inside of the routes folder,…inside of the source folder…and it's called crmRoutes.…
And what we'll do is…create all the routes that we need.…So in order to create a route,…we'll create a function…called routes.…Like so.…And we'll pass app,…inside of our routes function.…And the reason why we're doing that…is because we're going to use the routes function…inside of our index…in order to pass the endpoints that we'll just create.…Simple as that, okay.…So we'll create a few routes.…The first one and we're leveraging the variable…
- Setting up a project and a server
- Setting up a database and schema
- Creating POST, GET, PUT, and DELETE endpoints
- Serving files
Skill Level Intermediate
Node.js: Build Your First Microservice (2016)with Daniel Khan2h 9m Intermediate
1. Setting Up
2. Initial Server Build
3. CRUD Operations
4. Other API Options
Static files serving3m 16s
Next steps1m 1s
- 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.