diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9517f37 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +package-lock.json +*.*.swp diff --git a/index.html b/index.html index 46873a1..c3d7867 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@
This is some text
+This is some new text recently added
diff --git a/index.js b/index.js index 2cd03b2..5c2e496 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,9 @@ app.get('/', (req, res) => { io.on('connection', (socket) => { console.log('A new user is connected'); + socket.on('disconnect', ()=> { + console.log('User disconnected'); + }); }); server.listen(3333, () => { diff --git a/package.json b/package.json index 01346ab..984ce7e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node index.js", + "dev": "nodemon index.js" }, "keywords": [], "author": "", @@ -12,5 +14,8 @@ "dependencies": { "express": "^4.22.3", "socket.io": "^4.8.4" + }, + "devDependencies": { + "nodemon": "^3.1.14" } }