Toggle navigation
Toggle navigation
This project
Loading...
Sign in
은승우
/
LINEBOT
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
은승우
2019-12-05 15:55:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
773ae724ad4ac173f6b96b5ad9642a611c9673f1
773ae724
1 parent
508fefd2
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
app.js
app.js
View file @
773ae72
...
...
@@ -17,6 +17,7 @@ var httpsOptions = {
http
.
createServer
(
app
).
listen
(
80
);
https
.
createServer
(
httpsOptions
,
app
).
listen
(
443
);
/* if ssl expired
var greenlock= require('greenlock-express');
const lex = greenlock .create({
...
...
@@ -38,7 +39,9 @@ const lex = greenlock .create({
});*/
//papago api
app
.
get
(
'/photo/1.png'
,(
req
,
res
)
=>
{
res
.
send
(
fs
.
readFileSync
(
'./photo/1.png'
));
})
//번역 api_url
var
translate_api_url
=
'https://openapi.naver.com/v1/papago/n2mt'
;
...
...
@@ -89,9 +92,7 @@ async function handleEvent(event) {
fs
.
writeFileSync
(
'image.png'
,
chunk
);
});
});
app
.
get
(
'/photo/1.png'
,(
req
,
res
)
=>
{
res
.
send
(
fs
.
readFileSync
(
'./photo/1.png'
));
})
var
cheerio
=
require
(
'cheerio'
);
...
...
Please
register
or
login
to post a comment