EC2 Default User

dotenv

node_modules
.env
\ No newline at end of file
const Address = require('./Address.js');
const express = require('express');
const request = require('request');
require("dotenv").config("/home/ec2-user/OSS/Experiments/messenger/chat/custom_modules/.env");
// const KAKAO_KEY = process.env.KAKAO_KEY;
const TOKEN = process.env.CHANNEL_ACCESS_TOKEN;
const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
const TOKEN = 'YK56BfHFgpILrxRk1FZrdcouFguf5CBA5qxM3zfDH6N9jR/cfPxVdK1P9vZHAk69mZDSlSkXNLy25pzqJbXrn3y76hwmH0Kiuvx3OadFYcuidWSp7VYAj4SqJSljv/q5KoYAOE2il8jmQkf4bQKvXQdB04t89/1O/w1cDnyilFU='
const fs = require('fs');
const path = require('path');
const HTTPS = require('https');
const domain = "2019102158.oss2022chatbot.tk"
const domain = process.env.MY_DOMAIN;
const sslport = 23023;
const bodyParser = require('body-parser');
const app = express();
......
const { response } = require('express');
const fetch = require('node-fetch')
globalThis.fetch = fetch.fetch;
const fetch = () => import('node-fetch').then(({default: fetch}) => fetch());
require("dotenv").config("/home/ec2-user/project/emergency_room_ChatBot/.env");
const KAKAO_KEY = process.env.KAKAO_KEY;
var AddressList = new Array();
......@@ -12,26 +12,18 @@ function getAddress(currQuery, cb = ()=> {}) {
query: currQuery
}), {
method: "GET",
headers: { "Authorization": "KakaoAK c14234ba46c574c73715276c5644f397" }
headers: { "Authorization": KAKAO_KEY }
})
.then(response => response.json())
.then(data => {
//console.log(response)
AddressList = data.documents.map(({ road_address }) => ({ road_address }));
//console.log(AddressList)
cb(AddressList);
});
},100)
}
/*
getAddress('석수동길', function (address) {
console.log(address[0].road_address.address_name);
})
*/
/*
......
......@@ -2,8 +2,9 @@
const request = require('request');
// 요청을 위한 상수를 선언합니다: TOKEN은 자신의 것을 입력해주세요.
const TARGET_URL = 'https://notify-api.line.me/api/notify';
const TOKEN = 'YK56BfHFgpILrxRk1FZrdcouFguf5CBA5qxM3zfDH6N9jR/cfPxVdK1P9vZHAk69mZDSlSkXNLy25pzqJbXrn3y76hwmH0Kiuvx3OadFYcuidWSp7VYAj4SqJSljv/q5KoYAOE2il8jmQkf4bQKvXQdB04t89/1O/w1cDnyilFU=';
// 요청합니다.
require("dotenv").config("/home/ec2-user/OSS/Experiments/messenger/chat/custom_modules/.env");
// const KAKAO_KEY = process.env.KAKAO_KEY;
const TOKEN = process.env.CHANNEL_ACCESS_TOKEN;
request.post(
{
url: TARGET_URL,
......