0.0.1 • Published 11 years ago
sharejs.codemirror.example v0.0.1
sharejs.codemirror.example
This repo was created so I would have a working share.js / codemirror example with the following traits:
- Use Share.js 7.x
- Use CodeMirror for the text editor
- Use WebSockets instead of browserchannel for client / server communication. I like browserchannel, but I'm using share in a project that already has a huge number of dependencies.
- Use JavaScript instead of CoffeeScript. I don't know CoffeeScript, although I like the way it looks...
##Installation and Use##
###Server###
Using Git:
- After cloning the repo, run
npm installin its top level - To launch the server, run
node .in the top level. You can optionally pass a port to run on with the-pargument
Using NPM:
- Create a directory for the project and
cdinto it - Run
npm install share.js.codemirror.exampleto install - Run
node node_modules/share.js.codemirror.exampleto start the server. You can optionally pass a port to run on with the-pargument
###Client###
- Open a browser and launch
127.0.0.1:8007substituting a port number you passed as an argument when starting the server if needed. - Open another tab and launch the same url
- Type some JavaScript into the codemirror instances. They should be synced.