From ceba08e52c2b31ee403864e8cd45b0cd4bacfbab Mon Sep 17 00:00:00 2001 From: Demo User Date: Sun, 27 Mar 2022 19:57:28 +0000 Subject: [PATCH] HTTP server --- Readme.md | 0 index.js | 13 +++++++++++++ package.json | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 Readme.md create mode 100644 index.js create mode 100644 package.json diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..e69de29 diff --git a/index.js b/index.js new file mode 100644 index 0000000..f15a919 --- /dev/null +++ b/index.js @@ -0,0 +1,13 @@ +const express = require('express'); +const app = express(); +const http = require("http"); +const server = http.createServer(app); + +app.get('/', (req, res) => { + res.send('

Hello new user!!

'); +}); + +server.listen(3030, () => { + console.log('listening on beaglebone.local:3030'); +}); + diff --git a/package.json b/package.json new file mode 100644 index 0000000..b5ea055 --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "name": "socket-chat-example", + "version": "0.0.1", + "description": "my first socket.io app", + "dependencies": {} +}