You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
350 B
12 lines
350 B
const http = require("http")
|
|
const port = 3000
|
|
|
|
const server = http.createServer((req,res)=>{
|
|
res.statusCode = 200;
|
|
res.setHeader("Content-Type","text/plain; charset=utf-8")
|
|
res.end("Ahoj z meho prvního NodeJS serveru!\n")
|
|
})
|
|
|
|
server.listen(port,"127.0.0.1",()=>{
|
|
console.log(`Server běží http://localhost:${port}`)//AltGr+ý=`
|
|
})
|