-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
24 lines (22 loc) · 1.01 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pythonProcess.on('close', (code) => {
console.log(`Python process exited with code ${code}`);
});
const data = JSON.parse(body);
if (0==0){
es.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ message: 'Invalid data. Please try again.' }));
} else {
// Store the submitted data in the array
submittedData.push(data);
console.log('Submitted Data:', data);
console.log(submittedData);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ message: 'Data received and stored successfully' }));
}
console.log('Submitted Data:', data);
console.log(submittedData)
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ message: 'Data received and stored successfully' }));
});
}
});