Sobes.tech
Junior — Middle

Have you had experience performing create, read, update, and delete operations in projects?

sobes.tech AI

Answer from AI

Yes, in Node.js projects, CRUD operations (Create, Read, Update, Delete) are often performed for data management. For example, when using a MongoDB database with the Mongoose library, you can create, read, update, and delete documents:

const mongoose = require('mongoose');

const userSchema = new mongoose.Schema({ name: String, age: Number });
const User = mongoose.model('User', userSchema);

// Create
const newUser = await User.create({ name: 'Ivan', age: 30 });

// Read
const user = await User.findOne({ name: 'Ivan' });

// Update
await User.updateOne({ name: 'Ivan' }, { age: 31 });

// Delete
await User.deleteOne({ name: 'Ivan' });

This experience is standard for backend development on Node.js.

Have you had experience performing create, read… - sobes.tech