This is the basic tutorial for getting started with Loopback 4!
This tutorial demonstrates how to create a basic API for a todo list using LoopBack 4.
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
To follow this tutorial, begin with the Create your app scaffolding section.
- Create your app scaffolding
- Adding legacy juggler
- Add your Todo model
- Add a datasource
- Add a repository
- Add a controller
- Putting it all together
- Bonus: Integrate with a geo-coding service
Try it out
If you’d like to see the final results of this tutorial as an example application, follow these steps:
lb4 examplecommand to select and clone the todo repository:
$ lb4 example ? What example would you like to clone? (Use arrow keys) > 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 for LoopBack 4. rpc-server: A basic RPC server using a made-up protocol.
Switch to the directory.
Finally, start the application!
$ npm start Server is running on port 3000
Feel free to look around in the application’s code to get a feel for how it works. If you’re interested in learning how to build it step-by-step, then continue with this tutorial!
Check out our Gitter channel and ask for help with this tutorial.
Open an issue in loopback-next and we’ll take a look.
npm test from the root folder.
See all contributors.