Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: collaborative editing #36

Merged
merged 7 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions compose/dev/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,21 @@ services:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf

socket:
image: node:18
working_dir: /app
volumes:
- socket-node-modules:/app/node_modules
command: sh -c "yarn add yjs y-websocket && HOST=0.0.0.0 PORT=4233 npx y-websocket"

volumes:
db-data:
api-node-modules:
ui-node-modules:
proxy-node-modules:
prisma-node-modules:
socket-node-modules:

networks:
default:
Expand Down
7 changes: 7 additions & 0 deletions compose/dev/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ server {
proxy_set_header Connection "upgrade";
}

location /socket {
proxy_pass http://socket:4233;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

# This is not working
location /prisma {
rewrite ^/prisma(.*)$ /$1 break;
Expand Down
3 changes: 3 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"web-vitals": "^2.1.0",
"xterm": "^5.0.0",
"xterm-addon-fit": "^0.6.0",
"y-monaco": "^0.1.4",
"y-websocket": "^1.4.5",
"yjs": "^13.5.42",
"zustand": "^4.1.3"
},
"scripts": {
Expand Down
Loading