Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pédagogies Multimodales
PhonoDrop
Commits
78bd0d4f
Commit
78bd0d4f
authored
Apr 29, 2020
by
Sylvain Coulange
Browse files
add hostname puresky.fr plus middleware http
parent
02c32f04
Changes
1
Hide whitespace changes
Inline
Side-by-side
index.js
View file @
78bd0d4f
...
...
@@ -5,8 +5,15 @@ const fs = require('fs');
const
requestIp
=
require
(
'
request-ip
'
);
const
compression
=
require
(
'
compression
'
);
const
helmet
=
require
(
'
helmet
'
);
const
http
=
require
(
'
http
'
);
// PORT & HOSTNAME
const
server
=
http
.
createServer
((
req
,
res
)
=>
{
res
.
statusCode
=
200
;
res
.
setHeader
(
'
Content-Type
'
,
'
text/plain
'
);
res
.
end
(
'
Démarrage !
\n
'
);
});
const
port
=
6000
;
const
hostname
=
'
phonodrop.puresky.fr
'
;
server
.
listen
(
port
,
hostname
,
()
=>
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment