---
title: "Discussion on \"How do you create a simple server in Node.js that\nreturns Hello World?\" | Hashnode"
description: "Discussion on \"How do you create a simple server in Node.js that\nreturns Hello World?\". const http = require('http');\nconst port = 3000;\nconst server = http.createServer((req, res) => {\n  res.statusCode = 200;\n  res.setHeader('Content-Type', '"
url: "https://hashnode.com/posts/how-do-you-create-a-simple-server-in-nodejs-that-returns-hello-world/63adc5d5224901f4015d7f3f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How do you create a simple server in Node.js that returns Hello World?](https://rajamuhammadasher.com/how-do-you-create-a-simple-server-in-nodejs-that-returns-hello-world?utm_source=hashnode&utm_medium=feed)

const http = require('http'); const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', '

Sep 28, 2022 · 1 min read · rajamuhammadasher.com  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)

## Written by

[Raja Muhammad Asher](https://hashnode.com/@rajamuhammadasher)

@rajamuhammadasher · USA

  
[View profile](https://hashnode.com/@rajamuhammadasher)

Full Stack Developer

Full Stack Developer with a passion for building web applications. PHP, Node.js, Laravel, MySQL, MongoDB. Love collaborating &amp; making a difference

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
