I spent an embarrassingly long time seeing this term everywhere and not even knowing what it stood for 😭😂
🔁 CRUD: The Operations Your API Supports
CRUD stands for:
- Create (e.g., add a user)
- Read (e.g., get a list of notes)
- Update (e.g., change a password)
- Delete (e.g., remove a comment)
These are the basic operations you implement on your data, and your API exposes routes that handle these.
🧠 Models/Schemas: The Structure of Your Data
- Schemas define the shape of your data — for example, what fields a
User
must have (username
, email
, password
, etc.).
- Models are built from schemas and let you interact with the database in code.
- If you're using MongoDB with Mongoose, a schema might look like:
const userSchema = new mongoose.Schema({
username: String,
email: String,
password: String
});
const User = mongoose.model('User', userSchema);
🌐 Server: Where Your App Lives
- The server is the app that listens for incoming HTTP requests (like
GET /users
) and sends back responses.
- Node.js is the runtime that runs the server.
- Express is a web framework that makes handling routes and middleware easier.