Secret room chat room based on Nodejs

Source: Internet
Author: User

By the holiday period will nodejs re-review and play a bit sketch to design the interface, very good. (Note: The code is collated and placed on GitHub, please follow.) )

This chat room I gave it a definition of a name called "Secret chat room".

Requirements :

Technology Selection :

Backend: Nodejs,socket.io, Middleware (EXPRESS,BODY-PARSER,MULTER,EJS), Mongoose

Express: Is the Nodejs Web application framework, mainly to understand its router

Body-parser: Used to get the parameter values in the REQ

Multer: For uploading files

Ejs: for template rendering

Mongoose: Connecting the Mongoose Database

Database: MongoDB

Front End: Bootstrap layout, Vuejs for bidirectional binding, request or use of jquery Ajax, unused fetch (mainly bootstrap is based on jquery, So no use of webpack or browerify and other packaging tools for processing fetch).

Implementation :

1. Create a Web server

  

2, identity authentication, which routes to be identity processing.

  

4. Database Configuration

  

5. Define the data model

  

6, user registration, Login

  

7, establish Socket.io

  

8, the front-end code is relatively simple, no no is a few requests, the following only intercept the front-end Socke.io part.

  

  

Operating effect :

1. Login

  

2. Main interface

  

3. Create a room (create your own topic of interest)

  

3. Simulate two users

  

4, each room mouse move to show room content

  

5, join the room, will prompt who joins

  

6, exit the room, the same will be prompted, the room between the non-impact.

  

7. Message

  

There are still unfinished parts at this stage. such as the preservation of messages, personnel picture, collection and so on.

Subsequently, it is hoped that the NODEJS message processing can be made into a generic component that can be easily invoked in any system after the message center is installed.

Finally, a piece of sketch design.

Secret room chat room based on Nodejs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.