As mentioned earlier, we have 6 resources, People, Films, Starships, Species, Vehicles and Planets. We'll create all the models needed for this API. Next, move into the starwars directory from the terminal. A series of questions will be asked such as the name of the application, directory to store the project, the version of loopback you prefer and the kind of application you want loopback to provision. The Loopback CLI is an interactive wizard. Once you are done installing, go ahead and run the loopback command: lb Go ahead and install Loopback: npm install -g loopback-cli We'll ensure that the other HTTP verbs, POST, PUT, and DELETE will be active for these endpoints when building the API. In the analysis above, you'll observe that all the calls for the endpoints are GET requests. GET - /films / returns the details of a specific film.GET - /films returns a list of all the episodes.This resource is about the episodes of the Star Wars film.GET - /species / returns the details of a specific specie.GET - /species returns a list of all the species.This resource is about the type of characters in the Star Wars Universe.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |