GithubHelp home page GithubHelp logo

tcper / yorkie-js-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yorkie-team/yorkie-js-sdk

0.0 0.0 0.0 25.34 MB

Yorkie JavaScript SDK

Home Page: https://yorkie.dev/docs/js-sdk

License: Apache License 2.0

JavaScript 4.90% TypeScript 94.79% CSS 0.01% HTML 0.30% Dockerfile 0.01%

yorkie-js-sdk's Introduction

Yorkie JavaScript SDK

codecov

The Yorkie JavaScript SDK implements the client-side libraries.

How to use JS SDK

To get started using Yorkie JavaScript SDK, see: https://yorkie.dev/docs/js-sdk

How yorkie-js-sdk works

yorkie-js-sdk uses gRPC-web for communicating with Yorkie Server built on gRPC.

 +--Browser--+           +--Envoy---------+         +--Yorkie-----+
 |           |           |                |         |             |
 | gRPC-web  <- HTTP1.1 -> gRPC-web proxy <- HTTP2 -> gRPC server |
 |           |           |                |         |             |
 +-----------+           +----------------+         +-------------+

For more details: https://grpc.io/blog/state-of-grpc-web/

Building and Testing the SDK

Building yorkie-js-sdk

For building yorkie-js-sdk, You'll first need Node.js installed(Node.js version 16+ and npm version 7.10+ are required).

# install packages
$ npm install

# build
$ npm run build

For generating proto messages and the service client stub classes with protoc and the protoc-gen-grpc-web.

How to install protoc-gen-grpc-web: https://github.com/grpc/grpc-web#code-generator-plugin

# generate proto messages and the service client stub classes
$ npm run build:proto

Primary "source of truth" location of protobuf message is in yorkie. We manage the messages in the repository.

Testing yorkie-js-sdk with Envoy, Yorkie and MongoDB.

Start MongoDB, Yorkie and Envoy proxy in a terminal session.

$ docker-compose -f docker/docker-compose.yml up --build -d

Start the test in another terminal session.

$ npm run test

To get the latest server locally, run the command below then restart containers again:

$ docker pull yorkieteam/yorkie:latest
$ docker-compose -f docker/docker-compose.yml up --build -d

Starting co-editing example with CodeMirror

Start MongoDB, Yorkie and Envoy proxy in a terminal session.

$ docker-compose -f docker/docker-compose.yml up --build -d

Start the webpack-dev-server in another terminal session.

$ npm run dev

Open the co-editing example page served by webpack-dev-server in your browser.

$ open http://0.0.0.0:9000/

Contributing

See CONTRIBUTING for details on submitting patches and the contribution workflow.

Contributors ✨

Thanks goes to these incredible people:

yorkie-js-sdk's People

Contributors

akiacode avatar autumn-n avatar blurfx avatar cannalee90 avatar chacha912 avatar cozitive avatar crescent-stdio avatar daclouds avatar dc7303 avatar dependabot[bot] avatar easylogic avatar eithea avatar gollumnima avatar hackerwins avatar hunkim98 avatar hyosari-kim avatar jeemyeong avatar jeonjonghyeok avatar krapie avatar live-small avatar mojosoeun avatar nevation avatar parkeunae avatar parksil0 avatar ppeeou avatar semin-park avatar seonheekim avatar starkensin avatar umi0410 avatar xoxwgys56 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.