const http=require("http"); http.createServer(function (request,response){ response.writeHead(200,{'Content-type':'text/html'}); response.end('<h1> hello geovindu 2023 </h1>'); }).listen(3000); console.log('Server running at http://127.0.0.1:3000/'); //C:\Users\geovindu\WebstormProjects\untitled>node "helloworld.js" Server runing at http://127.0.0.1:3000/
const express=require('express'); const app=express(); app.get('/',(req,res)=>res.send('hello geovindu 涂聚文, 2023')); app.listen(3000,()=>console.log('Example app listening on port 3000!')) // Express //C:\Users\geovindu\WebstormProjects\untitled>node app.js
标签:node,http,app,javascript,js,3000,geovindu From: https://www.cnblogs.com/geovindu/p/17063759.html