Junior — Middle
Could you tell about specific backend tasks you performed in your current or last project?
sobes.tech AI
Answer from AI
In my last project, I worked on developing REST API with Node.js using Express. My tasks included:
- Implementing endpoints for CRUD operations with a database (MongoDB).
- Handling user authentication and authorization via JWT.
- Integrating with external services, such as sending notifications through third-party APIs.
- Optimizing queries and error handling to improve service stability.
Example code for creating a simple endpoint:
const express = require('express');
const router = express.Router();
// Get list of users
router.get('/users', async (req, res) => {
try {
const users = await User.find();
res.json(users);
} catch (err) {
res.status(500).json({ error: 'Server error' });
}
});
module.exports = router;