Skip to content

Software of Application with NodeJS, MongoDB and WebSockets

Notifications You must be signed in to change notification settings

EvgenyLukyanenko/Denker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DENKER

Description

This repository serves as a fullstack purely develop application in JavaScript, created with Nodejs, Express, MongoDB and web Sockets. He also added Bootstrap and Jquery to the design.

Installation

Install packages:

$ npm install

Usage

$ git clone https://github.com/DanielArturoAlejoAlvarez/Denker.git [NAME APP]

Follow the following steps and you're good to go! Important:

Start server to our API (includes auto refreshing):

$ cd [NAME APP]
$ npm start

alt text

Coding

Model

client.on('connection', (socket)=>{
        let chat = db.collection('chats')

        //function send Status
        sendStatus = (s)=>{
            socket.emit(s)
        }

        //Get chats from mongo collections
        chat.find().limit(100).sort({_id: 1}).toArray((err,res)=>{
            if(err) throw err

            //emit messages
            socket.emit('output', res)
        })

})

...

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/DanielArturoAlejoAlvarez/Denker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

About

Software of Application with NodeJS, MongoDB and WebSockets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 59.4%
  • HTML 24.1%
  • CSS 16.5%