Skip to content

GinCanhViet/React-with-SignaLR-and-MongoDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

React-with-SignaLR-and-MongoDB

Real-time chat demo. React with Visual Studio, SignaLR and MongoDB

Demo: http://chat.nguyencanhviet.com/

Hình minh họa

Đây chỉ là sản phẩm mình làm chơi để học ReactJS, có gì chưa đúng mong mọi người góp ý :D, nếu bạn nào chưa biết cách dùng signaLR thì có thể xem nó để biết cách hoạt động thôi, nó ko theo chuẩn mực nào nhé :D

================================

  1. Cài đặt NodeJS: https://nodejs.org/en/
  2. Vào đây để tạo MongoDB free: https://mlab.com/home
  3. Tạo DB có tên realtimechatdemo, sau đó trong DB này tạo tiếp một collection tên là: messages (dùng để lưu trữ tin nhắn)
  4. Bấm qua phần user, add user cho DB, để sau này điền vào connection string, dùng cho việc kết nối tới DB. Hình minh họa Hình minh họa
  5. Copy connection string ở hình trên, thay username và password của DB vào.
  6. Bỏ connection string vào RealTimeUsingSignalR.Models.MessageModel
public MessageModel()
{
    //Create a mongoDB free: https://mlab.com/
    mongoUrl = new MongoUrl(@"your connection string here");
    ...
}
  1. Clean and Rebuild project. Nếu là lần đầu, bạn cần phải đợi để tất cả các node module được tải xuống trong ít phút.

About

Real-time chat demo. React with Visual Studio, SignaLR and MongoDB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published