유명현

EDIT: refactor - make directory apis/

1 const express = require("express"); 1 const express = require("express");
2 const line = require("@line/bot-sdk"); 2 const line = require("@line/bot-sdk");
3 -const setFlexMessage = require("./pushMessage"); 3 +const setFlexMessage = require("./apis/setFlexMessage");
4 require("dotenv").config(); 4 require("dotenv").config();
5 const config = { 5 const config = {
6 channelAccessToken: process.env.channelAccessToken, 6 channelAccessToken: process.env.channelAccessToken,
...@@ -41,3 +41,4 @@ function handleEvent(event) { ...@@ -41,3 +41,4 @@ function handleEvent(event) {
41 } 41 }
42 42
43 app.listen(3000); 43 app.listen(3000);
44 +console.log("listening...");
......
This diff is collapsed. Click to expand it.
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
15 "author": "", 15 "author": "",
16 "license": "MIT", 16 "license": "MIT",
17 "dependencies": { 17 "dependencies": {
18 + "@line/bot-sdk": "^7.5.0",
19 + "dotenv": "^16.0.1",
18 "express": "^4.18.1", 20 "express": "^4.18.1",
19 "nodemon": "^2.0.16" 21 "nodemon": "^2.0.16"
20 } 22 }
......