Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

print os.hostname server

Christian Feiaabeb2795743
diff --git a/index.js b/index.js
index 126af91..d26fbda 100644
--- a/index.js
+++ b/index.js
@@ -1,4 +1,5 @@
import fs from 'fs'
+import os from 'os'
import Repository from './lib/repository.js'
import { createServer } from './lib/server.js'
@@ -17,7 +18,7 @@ async function main ({port = 3000} = {}) {
createServer({repo, port, connections})
.listen(port, () => {
- console.log(`Server running at http://localhost:${port}`)
+ console.log(`Server running at http://${os.hostname()}:${port} (or http://localhost:${port})`)
})
}