-
Notifications
You must be signed in to change notification settings - Fork 0
/
brouillon.txt
61 lines (58 loc) · 1.38 KB
/
brouillon.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// const getWheather = city => {
// axios
// .get(
// `http://api.openweathermap.org/data/2.5/weather?q=$Paris&appid=$4fb57f54267ffcb73fb6b5109bada85e`
// )
// .then(resp => {
// const data = resp;
// console.log(data);
// return resp.json();
// });
// };
const getWheather = (req, res) => {
// // const city = req.params.city;
// const city = "paris";
// console.log(req);
// axios
// .get(
// `http://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${process.env.API_KEY}`
// )
// // .then((res) => res.JSON.parse(res.data))
// .then((result) => res.status(201).json(result))
// .catch((err) => res.status(401).json(err));
// };
// console.log(getWheather("Paris"));
// module.exports = { getWheather };
// // export function getWheather();
const object = {
wheather: "Clair",
temp: 15,
tempFeelLike: 1,
windspeed: 15,
tempMin: -1,
tempMax: 2,
hum: 20,
nameCity: "Paris",
};
const object = [
{
weather: "Clair",
temp: 15,
tempFeelLike: 1,
windspeed: 15,
tempMin: -1,
tempMax: 2,
hum: 20,
nameCity: "Paris",
},
{
weather: "Clair",
temp: 15,
tempFeelLike: 1,
windspeed: 15,
tempMin: -1,
tempMax: 2,
hum: 20,
nameCity: "Paris",
},
];