Toggle navigation
Toggle navigation
This project
Loading...
Sign in
장주현
/
Amazon_Shopping_Helper
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
장주현
2020-06-25 04:27:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
38fb4e8fe3b180280560433e3974a2f39dbd01cc
38fb4e8f
1 parent
a565fc82
ssl
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletions
app.js
app.js
View file @
38fb4e8
...
...
@@ -6,6 +6,8 @@ const app = express();
const
PAPAGO_URL
=
'https://openapi.naver.com/v1/papago/n2mt'
const
PAPAGO_ID
=
'cIZBOTfISMHEyygh_NHp'
;
const
PAPAGO_SECRET
=
'8D32UNGgYp'
;
const
HTTPS
=
require
(
'https'
);
const
domain
=
"www.chatosscjh.tk"
const
PORT
=
process
.
env
.
PORT
||
3000
;
//const indexRoute = require("./routes/index");
...
...
@@ -122,4 +124,19 @@ function trans(message, totrans){
return
body
.
message
.
result
.
translatedText
;
}
});
};
\ No newline at end of file
};
try
{
const
option
=
{
ca
:
fs
.
readFileSync
(
'/etc/letsencrypt/live/'
+
domain
+
'/fullchain.pem'
),
key
:
fs
.
readFileSync
(
path
.
resolve
(
process
.
cwd
(),
'/etc/letsencrypt/live/'
$
cert
:
fs
.
readFileSync
(
path
.
resolve
(
process
.
cwd
(),
'/etc/letsencrypt/live/$
};
HTTPS.createServer(option, app).listen(sslport, () => {
console.log(`[HTTPS] Server is started on port ${sslport}`);
});
} catch (error) {
console.log('
[
HTTPS
]
HTTPS
오류가
발생하였습니다
.
HTTPS
서버는
실행되지
않
$
console
.
log
(
error
);
}
...
...
Please
register
or
login
to post a comment