Giter VIP home page Giter VIP logo

sharedb-ace-backend's Introduction

sharedb-ace-backend

The backend for the collaborative editor in the Source Academy.

Based on the original version by She Jiayu and Jethro Kuan.

Running locally

$ git clone https://github.com/source-academy/sharedb-ace-backend.git
$ yarn install
$ node index.js

Then set in your frontend environment:

REACT_APP_SHAREDB_BACKEND_URL=http://localhost:8080/

sharedb-ace-backend's People

Contributors

angelsl avatar dependabot[bot] avatar jiayushe avatar shenyih0ng avatar wrjgold avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sharedb-ace-backend's Issues

Remove sessions after last user disconnects

Currently sessions are never removed from memory, and we prevent the server from running out of memory by externally restarting it every Sunday morning.

Instead of this, we can automatically remove sessions from the ShareDB some time after the last user disconnects.

Implementation:

  1. Track the number of users connected to each session by binding to the WebSocket connect/disconnect events. Also track the last disconnect time.
  2. Every hour or so, remove sessions that have no users and whose last disconnection time is more than an hour old.

Security vulnerabilities reported by GitHub

source-academy/sharedb-ace-backend

Known high severity security vulnerability detected in lodash < 4.17.13 defined in package-lock.json.package-lock.json update suggested: lodash ~> 4.17.13. | Known high severity security vulnerability detected in lodash < 4.17.13 defined in package-lock.json. | package-lock.json update suggested: lodash ~> 4.17.13.
Known high severity security vulnerability detected in lodash < 4.17.13 defined in package-lock.json.
package-lock.json update suggested: lodash ~> 4.17.13.

source-academy/sharedb-ace-backend

Known high severity security vulnerability detected in lodash < 4.17.13 defined in yarn.lock.yarn.lock update suggested: lodash ~> 4.17.13. | Known high severity security vulnerability detected in lodash < 4.17.13 defined in yarn.lock. | yarn.lock update suggested: lodash ~> 4.17.13.
Known high severity security vulnerability detected in lodash < 4.17.13 defined in yarn.lock.
yarn.lock update suggested: lodash ~> 4.17.13.

Another vulnerability, also found by Github

source-academy/sharedb-ace-backend

Known high severity security vulnerability detected in ws >= 0.2.6, < 3.3.1defined in yarn.lock.yarn.lock update suggested: ws ~> 3.3.1. | Known high severity security vulnerability detected in ws >= 0.2.6, < 3.3.1defined in yarn.lock. | yarn.lock update suggested: ws ~> 3.3.1.
Known high severity security vulnerability detected in ws >= 0.2.6, < 3.3.1defined in yarn.lock.
yarn.lock update suggested: ws ~> 3.3.1.

Make API REST-ful

GET /gists/latest shouldn't cause a new instance to be created. Need to fix the frontend to POST /gists/new instead.

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.