Code Monkey home page Code Monkey logo

cloudbase-realtime-demo's Introduction

云开发实时聊天室

这是一个使用云开发各项能力开发的实时聊天室 Demo

如何开始

准备工作

  1. 开通云开发环境
  2. 开启匿名登录
  3. 在数据库中创建一个集合 messages
  4. 添加 localhost:3000 到安全域名,可以参考这里

第 1 步:下载项目与安装依赖

git clone https://github.com/TencentCloudBase/cloudbase-realtime-demo.git
cd cloudbase-realtime-demo
npm install

第 2 步:修改部分代码

src/App.js 中的初始化代码中,填入你的环境 ID:

const app = cloudbase.init({
  env: "**your-env-id**",
});

第 3 步:开启开发环境

npm run start

打开浏览器 http://localhost:3000 ,即可预览。

第 4 步:构建

npm run build

构建结果将会输出到 build 目录下。

更多信息可以参考: deployment

cloudbase-realtime-demo's People

Contributors

starkwang avatar binggg avatar dependabot[bot] avatar

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.