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-04 13:42:27 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e5382ee1b3703b7d7ccdead14fbac93ec6104676
e5382ee1
1 parent
7295dede
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
app.js
app.js
View file @
e5382ee
...
...
@@ -5,7 +5,7 @@ var request = require('request');
var
https
=
require
(
'https'
);
var
http
=
require
(
'http'
);
/*
var fs = require("fs");
var httpsOptions = {
...
...
@@ -14,8 +14,8 @@ var httpsOptions = {
};
http.createServer(app).listen(80);
https
.
createServer
(
httpsOptions
,
app
).
listen
(
443
);
/* if ssl expired
https.createServer(httpsOptions, app).listen(443);
*/
var
greenlock
=
require
(
'greenlock-express'
);
const
lex
=
greenlock
.
create
({
version
:
'draft-11'
,
// 버전2
...
...
@@ -33,7 +33,13 @@ const lex = greenlock .create({
},
renewWithin
:
81
*
24
*
60
*
60
*
1000
,
renewBy
:
80
*
24
*
60
*
60
*
1000
,
});*/
});
https
.
createServer
(
lex
.
httpsOptions
,
lex
.
middleware
(
app
)).
listen
((
process
.
env
.
SSL_PORT
||
443
),()
=>
{
console
.
log
(
"server on 443"
);
});
http
.
createServer
(
lex
.
middleware
(
require
(
'redirect-https'
)())).
listen
(
process
.
env
.
PORT
||
80
,()
=>
{
console
.
log
(
"server on 80"
);
});
//papago api
...
...
Please
register
or
login
to post a comment