Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이나경
/
time_table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
송민석
2022-06-08 12:47:24 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3735c827bc42111514cee7214fd90eff8baa46a9
3735c827
1 parent
f184a7ca
Test chatbot.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
chatbot.js
chatbot.js
View file @
3735c82
<<<<<<<
HEAD
:
chatbot
.
js
var
express
=
require
(
'express'
);
const
request
=
require
(
'request'
);
const
TARGET_URL
=
'https://api.line.me/v2/bot/message/reply'
...
...
@@ -105,3 +106,34 @@ try {
console
.
log
(
'[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.'
);
console
.
log
(
error
);
}
=======
const
config
=
require
(
'./config'
)
const
mongoose
=
require
(
"mongoose"
);
const
connect
=
mongoose
.
connect
(
config
.
url
,
{
useNewUrlParser
:
true
,
useUnifiedTopology
:
true
,
})
.
then
(()
=>
console
.
log
(
"DB : Succesfully Connected"
))
.
catch
((
err
)
=>
console
.
log
(
err
.
message
));
/*
const { MongoClient } = require("mongodb");
const config =require('./config')
const client = new MongoClient(config.url);
async function run() {
try {
await client.connect();
console.log("Connected correctly to server");
} catch (err) {
console.log(err.stack);
}
finally {
await client.close();
}
}
run().catch(console.dir);
*/
>>>>>>>
86
b0ca0
(
Modify
index
.
js
file
):
index
.
js
...
...
Please
register
or
login
to post a comment