Solhee

fileDeletion

1 -var express = require('express');
2 -const request = require('request');
3 -const api_url = 'http://apis.data.go.kr/1471000/FoodAdtvInfoService/getFoodAdtvInfoList?';
4 -//발급받은 키
5 -const key = 'PFs%2BxbmfLdZwXaK7l5l9w4xEcdaDcYByiEj9PoHq2KCPAtx%2FE1N7OPUaCPr6bam18nVQgKOnuxMlaRsJhG6gyQ%3D%3D'
6 -
7 -const a_url = api_url +'ServiceKey='+key+'&numOfRows=3&pageNo=4';
8 -
9 -console.log(a_url);
10 -
11 -
12 -request(a_url, function(error, response, body){
13 - if(!error && response.statusCode ==200)
14 - console.log(body);
15 -})
16 -
17 -/*
18 -request.post({
19 - url: a_url,
20 - form:{
21 - key:'value',
22 - }
23 -
24 -},(error,respopnse,body) =>{
25 - console.log(body)
26 -});
27 -*/
...\ No newline at end of file ...\ No newline at end of file
1 -const variable1 = "값1";
2 -const variable2 = "값2";
...\ No newline at end of file ...\ No newline at end of file
1 -exports.add = function(a,b) {
2 - return a+b;
3 -}
4 -exports.sub = function(a,b) {
5 - return a-b;
6 -}
...\ No newline at end of file ...\ No newline at end of file