hackergrrl / hyperpad

:bamboo: A peer-to-peer collaborative text editor for people and their communities.
198 stars 16 forks source link

gh-pages for example server #10

Open jsalsman opened 6 years ago

jsalsman commented 6 years ago

Hi Stephen,

Would you please set up a hyperpad demo server like you had at some point on http://pad.eight45.net so that it can work from http://noffle.github.io/hyperpad ?

https://pages.github.com https://guides.github.com/features/pages/ https://gist.github.com/chrisjacob/833223 https://help.github.com/articles/creating-project-pages-using-the-command-line/

I would try this and give you a pull request except that you already had that WIP page so it is probably so much easier for you? Please let me know either way.

Best regards,

jsalsman

hackergrrl commented 6 years ago

Hey James -- jazzed that you're interested! I took down the prototype pad because it had some serious issues with concurrency: pad contents were getting pretty scrambled in a lot of editing cases. I decided to take it down and focus right now on hyperpad-desktop, an Electron app, to try and get the hyper-string primitive really rock solid before taking on the additional challenges that web brings.

jsalsman commented 6 years ago

No problem. I'd love to try to debug it with the help of a gh-pages WIP config, but I'm not exactly sure what it needs to serve the initial empty pad in a way that all the clients can find each other. If you tell me, I'll put up a gh-pages on my fork (or server if it needs non-static content) and send you a pull request if and when I get it debugged with my friends. I was at a hackathon meetup today and there was a lot of interest in using it as a shared text database along with the collaborative human editable function.

hackergrrl commented 6 years ago

Sure. There's two pieces to run:

  1. the hyperpad web server (this hosts the webpage that shows the pad and loads pads)
  2. a publicly accessible signalhub (this helps WebRTC peers locate and connect to each other)

You'll probably want to run both on a VPS with a public IP, though you can also run the hyperpad web server offline on your local machine & edit freely, and it'll sync to peers later when you go online!

# signalhub
$ npm i -g signalhub
$ signalhub

# hyperpad web server
$ git clone git@github.com:noffle/hyperpad
$ cd hyperpad
$ npm install
$ vim +50 index.js  # edit line 50 of index.js to include your signalhub's IP address
$ npm start

Jazzed to hear there's interest! Let me know how it goes, and what kinds of support (tech, docs) y'all need.