diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40b878d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ \ No newline at end of file diff --git a/creating-server.js b/creating-server.js new file mode 100644 index 0000000..ee0b757 --- /dev/null +++ b/creating-server.js @@ -0,0 +1,9 @@ +const http = require('http'); + +function dataControl(req , res){ + res.write("

Server is running on Port 8000

"); + res.end(); +} +http.createServer(dataControl).listen(8000); + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a06bf77 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,24 @@ +{ + "name": "learning NodeJs", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "http": "^0.0.1-security" + } + }, + "node_modules/http": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz", + "integrity": "sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g==" + } + }, + "dependencies": { + "http": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz", + "integrity": "sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..bd8abcd --- /dev/null +++ b/package.json @@ -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": "" +}