Giter Site home page Giter Site logo

mongochat's Introduction

MongoChat

Simple chat app that uses MongoDB and Socket.io

Version

1.0.0

Install Dependencies

npm install 

Run Server

npm start

Run App

Open index.html

mongochat's People

Contributors

anujraval24 avatar bradtraversy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongochat's Issues

Mongo error

Aft

throw err
^
MongoError: failed to connect to server [127.0.0.1:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]

i am encounting the error while running server.js

Microsoft Windows [Version 10.0.17134.829]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\HP\Desktop\modified Sknchat>npm start

[email protected] start C:\Users\HP\Desktop\modified Sknchat
node server.js

(node:18280) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(node:18280) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
C:\Users\HP\Desktop\modified Sknchat\node_modules\mongodb\lib\topologies\server.js:240
throw err;
^

MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool. (C:\Users\HP\Desktop\modified Sknchat\node_modules\mongodb\lib\core\topologies\server.js:431:11)
at Pool.emit (events.js:182:13)
at connect (C:\Users\HP\Desktop\modified Sknchat\node_modules\mongodb\lib\core\connection\pool.js:580:14)
at makeConnection (C:\Users\HP\Desktop\modified Sknchat\node_modules\mongodb\lib\core\connection\connect.js:39:11)
at callback (C:\Users\HP\Desktop\modified Sknchat\node_modules\mongodb\lib\core\connection\connect.js:261:5)
at Socket.err (C:\Users\HP\Desktop\modified Sknchat\node_modules\mongodb\lib\core\connection\connect.js:286:7)
at Object.onceWrapper (events.js:273:13)
at Socket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Roaming\npm-cache_logs\2019-09-17T18_05_33_397Z-debug.log

C:\Users\HP\Desktop\modified Sknchat>

socket.emit vs client.emit

Hello sir, why we use "client.emit(...)" in line 43 instead of "socket.emit".
I try to change it to "socket.emit", but it not work, and I don't know why.. Can you explain it for me ?.
Thanks and sorry for my bad english
111

2222

mongo chat

sir, there are some changes , which need to be added to your code

  1. useparserstring = true
  2. in deploying heroko app
    there must be / insted of //
    thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.