Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @loopback/example-todo with all npm packages installed. Try it out:

var exampleTodo = require("@loopback/example-todo")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@loopback/example-todo v1.9.2

Tutorial example on how to build an application with LoopBack 4.


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. You will experience how you can create REST APIs with just 5 steps.



First, you'll need to install a supported version of Node:

Additionally, this tutorial assumes that you are comfortable with certain technologies, languages and concepts.

  • JavaScript (ES6)
  • REST

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.


  1. Create your app scaffolding
  2. Add your Todo model
  3. Add a datasource
  4. Add a repository
  5. Add a controller
  6. Putting it all together
  7. 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:

  1. Run the lb4 example command to select and clone the todo repository:

    lb4 example todo
  2. Switch to the directory.

    cd loopback4-example-todo
  3. Finally, start the application!

    $ npm start
    Server is running at

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!

Need help?

Check out our Gitter channel and ask for help with this tutorial.


Open an issue in loopback-next and we'll take a look.



Run npm test from the root folder.


See all contributors.




RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free