const http = require('http');
async function test() {
  const req = http.request({
    hostname: 'localhost',
    port: 3000,
    path: '/api/projects',
    method: 'GET',
    headers: {
      'Accept': 'application/json'
    }
  }, (res) => {
    let rawData = '';
    res.on('data', (chunk) => rawData += chunk);
    res.on('end', () => {
      console.log('Status code:', res.statusCode);
      console.log('Raw data length:', rawData.length);
      console.log('Raw data start:', rawData.slice(0, 200));
    });
  });
  req.on('error', (e) => console.error(`problem with request: ${e.message}`));
  req.end();
}
test();
