Skip to content

Commit

Permalink
creating server using normal function
Browse files Browse the repository at this point in the history
  • Loading branch information
codingXpert committed Jun 19, 2022
1 parent ee0309b commit 3319c99
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
9 changes: 9 additions & 0 deletions creating-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const http = require('http');

function dataControl(req , res){
res.write("<h1>Server is running on Port 8000</h1>");
res.end();
}
http.createServer(dataControl).listen(8000);


24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"dependencies": {
"http": "^0.0.1-security"
},
"name": "learning-nodejs",
"version": "1.0.0",
"main": "creating-server.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/codingXpert/Learning-NodeJs.git"
},
"author": "xyz",
"license": "ISC",
"bugs": {
"url": "https://github.com/codingXpert/Learning-NodeJs/issues"
},
"homepage": "https://github.com/codingXpert/Learning-NodeJs#readme",
"description": ""
}

0 comments on commit 3319c99

Please sign in to comment.