Websocket editor is website that allows teams to edit the same rich text editor simultaneously.
This project was bootstrapped with websocket-editor. Original code is working with slate v0.47. Here is an updated version which works with recent codebase, has support for images drag/drop & copy/paste.
To run app locally first start server and then open client React app(s).
To start server:
- navigate to
server
folder - run
npm i
to install dependencies - Start server by running
npm start
ornode server.js
In the project root directory run npm i
to install client dependencies.
Then you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser. The page will reload when you make changes.
You may also see any lint errors in the console.npm run build
Builds the app for production to thebuild
folder.
It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.
Your app is ready to be deployed! See the section about deployment for more information.
Brefore you begin, ensure you have met the following requirements:
- You have Docker installed
- navigate to the projects root directory
- setup and run containers
docker-compose up
- go to localhost:3000 in your browser
- navigate to the projects root directory
- build app docker image
docker build -t editorprodimg .
- create docker container and start the container
docker run --name prodEditor -e NODE_ENV=production -p 4000:4000 editorprodimg
or in daemon mode:
docker run --name prodEditor -e NODE_ENV=production -p 4000:4000 editorprodimg -d
- go to localhost:4000 in your browser
To teardown the development app, do the following:
- navigate to the projects root directory
- stop and remove containers
docker-compose down
To teardown the production app do the following:
- navigate to the projects root directory
- stop and remove containers
docker rm -f prodApp