mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-02 20:15:25 +02:00
Main elements created (#4)
This commit is contained in:
parent
248558a11f
commit
4326cb22ab
13 changed files with 172 additions and 13 deletions
4
bin/www
4
bin/www
|
@ -22,7 +22,6 @@ const server = http.createServer(app);
|
|||
/**
|
||||
* Listen on provided port, on all network interfaces.
|
||||
*/
|
||||
|
||||
server.listen(port);
|
||||
server.on('error', onError);
|
||||
server.on('listening', onListening);
|
||||
|
@ -30,7 +29,6 @@ server.on('listening', onListening);
|
|||
/**
|
||||
* Normalize a port into a number, string, or false.
|
||||
*/
|
||||
|
||||
function normalizePort(val) {
|
||||
const port = parseInt(val, 10);
|
||||
|
||||
|
@ -50,7 +48,6 @@ function normalizePort(val) {
|
|||
/**
|
||||
* Event listener for HTTP server "error" event.
|
||||
*/
|
||||
|
||||
function onError(error) {
|
||||
if (error.syscall !== 'listen') {
|
||||
throw error;
|
||||
|
@ -78,7 +75,6 @@ function onError(error) {
|
|||
/**
|
||||
* Event listener for HTTP server "listening" event.
|
||||
*/
|
||||
|
||||
function onListening() {
|
||||
const addr = server.address();
|
||||
const bind = typeof addr === 'string'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue