mirror of
https://github.com/sergeyyarkov/node-docker-example.git
synced 2026-10-11 02:09:22 +03:00
16 lines
338 B
JavaScript
16 lines
338 B
JavaScript
import http from 'node:http';
|
|
import Response from './response.js';
|
|
|
|
/**
|
|
* Get list of all artcles from database
|
|
*
|
|
* @param {http.ClientRequest} req
|
|
* @param {Response} res
|
|
*/
|
|
export const getArticlesHandler = async (req, res) => {
|
|
res.json([
|
|
{ id: 1, title: 'First artcile' },
|
|
{ id: 2, title: 'Second artcile' },
|
|
]);
|
|
};
|