Toggle navigation
Toggle navigation
This project
Loading...
Sign in
kykint
/
TELEGRAMBOT
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
kykint
2019-05-27 23:08:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
137f1167dcc2ee0e281bac2920fe691296663b02
137f1167
1 parent
15f5dc34
Add experimental support for HTTPS
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
bin/www
bin/www
View file @
137f116
...
...
@@ -6,7 +6,7 @@
var
app
=
require
(
'../app'
);
var
debug
=
require
(
'debug'
)(
'project:server'
);
var
http
=
require
(
'http
'
);
var
http
s
=
require
(
'https
'
);
var
fs
=
require
(
'fs'
);
/**
...
...
@@ -17,10 +17,18 @@ var port = normalizePort(process.env.PORT || '3000');
app
.
set
(
'port'
,
port
);
/**
* Create HTTP server.
* Create HTTP
S
server.
*/
var
server
=
http
.
createServer
(
app
);
const
domain
=
'kykint.shop'
;
const
certdir
=
'/etc/letsencrypt/live/'
+
domain
;
const
credentials
=
{
key
:
fs
.
readFileSync
(
certdir
+
'/privkey.pem'
,
'utf8'
),
cert
:
fs
.
readFileSync
(
certdir
+
'/cert.pem'
,
'utf8'
),
ca
:
fs
.
readFileSync
(
certdir
+
'/chain.pem'
,
'utf8'
)
}
var
server
=
https
.
createServer
(
credentials
,
app
);
/**
* Listen on provided port, on all network interfaces.
...
...
Please
register
or
login
to post a comment