This is an example of how to mount LoopBack 4 REST API on a simple Express application.
First, you'll need to install a supported version of Node:
- Node.js at v8.9 or greater
Additionally, this tutorial assumes that you are comfortable with certain technologies, languages and concepts.
Lastly, you'll need to install the LoopBack 4 CLI toolkit:
npm i -g @loopback/cli
Once you're ready to start, you can begin by visiting the tutorial page.
Try it out
If you'd like to see the final results of this tutorial as an example application, follow these steps:
Generate the example using CLI
lb4 examplecommand to select and clone the
express-compositionrepository:$ lb4 example? What example would you like to clone?todo: Tutorial example on how to build an application with LoopBack 4.todo-list: Continuation of the todo example using relations in LoopBack 4.hello-world: A simple hello-world Application using LoopBack 4.log-extension: An example extension project
Jump into the directory and then install the required dependencies:cd loopback4-example-example-composition
Finally, start the application!$ npm startServer is running at http://127.0.0.1:3000
Feel free to look around in the application's code to get a feel for how it works.
npm test from the root folder.