v2.5.2
Giriş yap

İİS Local Hostunu Node JS İçin Kullanmak

Anonim
676 defa görüntülendi

Node Js Projem İçin localhost

Node Js projem için localhost kullanmak istiyorum ama bir türlü çalıştıramadım, iis localhostu windows un . öneriniz varmı ya da Tayfun Hocam Bir Node js için local host çalıştırma videosu çekebilir mi?

Cevap yaz
Cevaplar (2)
mrdark
1041 gün önce
const express = require('express')
const app = express()
 
app.get('/', function (req, res) {
  res.send('Hello World')
})
 
app.listen(3000)

veya

// Require the framework and instantiate it
const fastify = require('fastify')({
  logger: true
})

fastify.get('/', (request, reply) => {
  reply.send({ hello: 'world' })
})

fastify.listen(3000, (err, address) => {
  if (err) throw err
})
mrturk
1301 gün önce

localhost yazıp yanına port un sayısını yaz
örnek : localhost:3000