Level 18: Seed In-Memory Data
- Create an in-memory array to hold a few starter records.
- Export it or keep it in the same module as your Express routes for now.
- Log the data at launch so you know what the initial state looks like.
- Remember: Use your own resource type (not
items)—whether it’s books, courses, pets, or something else you chose.
Show Me: seed in-memory data array
const itemsStorage = [
{ id: 1, title: 'Notebook', price: 4.99, tags: ['stationery', 'paper'] },
{ id: 2, title: 'Mechanical Pencil', price: 2.49, tags: ['stationery'] }
];
console.log('Seeded items:', itemsStorage);
export default itemsStorage;