From the course: Building APIs with LoopBack
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
What are data sources? - Node.js Tutorial
From the course: Building APIs with LoopBack
What are data sources?
- [Instructor] So you're probably asking when we made a cat, where was that stored? LoopBack works with data via something called data sources. A data source is simply where data is saved. That's probably pretty obvious, but, what may not be obvious is that LoopBack handles 100 percent of that access for you. So when a cat was created, LoopBack did what was necessary to persist it. When you asked for a cat, it did the same. Basically, all the crud operations are handled for you by LoopBack and this feature. Out of the box, LoopBack uses a memory data source. In other words, it stores information in RAM. Now, that's important to remember because it means if you restart your server, you'll lose all your data. But when you're testing models and playing around, the memory base source works immediately with no setup. It's terribly handy and a great way to get started, but not something you go to production with. Luckily, LoopBack can talk to many types of persistent systems. I won't read…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.