-
Notifications
You must be signed in to change notification settings - Fork 0
/
a.txt
43 lines (25 loc) · 931 Bytes
/
a.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
hey everyone
const fs = require("fs");
const express = require("express");
function callbackfn(err, data) {
console.log(data);
}
fs.readFile("a.txt", "utf-8", callbackfn);
function handleFirstRequest(req, res) {
console.log(req.headers);
var con = req.headers.con;
//var coun = req.query.calc; // Retrieve the counter value from query parameters
let answ = "the ok sum is " + calSum(con) + " ok mm"; // Use the retrieved counter value
console.log(req.query.c2);
res.send(` ${answ}`);
}
// 2) using headers
function handleFirstRequest(req, res) {
//console.log(req.headers);
console.log(req.body);
var con = req.body.con;
//var coun = req.query.calc; // Retrieve the counter value from query parameters
let answ = "the ok sum is " + calSum(con) + " ok mm"; // Use the retrieved counter value
//console.log(req.query.c2);
res.send(` ${answ}`);
}