Writeurl - an online collaborative editor
Writeurl is a collaborative editor
Writeurl is a client server system. The frontend code is written in pure
The client and server communicate through a WebSocket connection. The client stores local
changes in the browser's local storage. The editor can be used in offline mode. Changes are
always uploaded to the server when a connection is available.
Writeurl documents are identified by their (write)url:
There is a read only version with a (read)url of the form
This url structure makes it easy to share documents. No user registration is needed.
Writeurl as an online service
Writeurl is available as an online service at www.writeurl.com
The code running the online service is the same as in this git repo.
Writeurl can be installed and run locally as an alternative to using the online service.
The only required dependeny is node.js and the modules in package.json.
It is recommended to use node.js version 8.
Clone the repo
git clone https://github.com/morten-krogh/writeurl.git
Install the node js modules
Build the browser code
Go to the writeurl directory. Use the build script.
bash build.sh browser
Now the browser code is available in the directory
Configuring the server
The node.js server code is located in the directory
The server needs a configuration file in the YAML format. An example file is
port: 9000 release: public: /Users/mkrogh/writeurl/build/release/browser debug: host: debug.writeurl.localhost public: /Users/mkrogh/writeurl/build/debug/browser documents: path: /Users/mkrogh/writeurl-test-dir/doc_dir publish: public: /Users/mkrogh/writeurl-test-dir/publish_dir # Pino logger # Output goes to stdout. logger: # levels: silent, fatal, error, warn, info, debug, trace level: trace
port is the port at which the server listens.
debug are the directories built above containing the browser code.
documents is the directory where all the writeurl documents will be stored. The server uses files to
store the documents (one subdirectory per document).
publish is the directory where the published (html) versions of the documents will be stored.
logger.level is the logging level. Logging goes to standard output.
Starting the server
In the directory
node writeurl-server.js config.yaml
Go to localhost:9000 in the browser and start typing.
Example production installation
For production, it is recommended to use a reverse proxy with TLS, and to daemonize the
Writeurl server. For daemonization, one can use a node.js process manager or a system daemon
such as systemd on Linux.
The online Writeurl service uses nginx as a reverse proxy and systemd under Linux for daemonization.
Example nginx configuration
An example nginx.conf file is located at
Example systemd unit file
[Unit] Description = writeurl server After = network.target [Service] Type = simple User = www ExecStart = /home/www/.nvm/versions/node/v8.9.4/bin/node /home/www/writeurl/server-nodejs-express/writeurl-server.js /home/www/writeurl/server-nodejs-express/config-debian.yaml Restart = on-failure [Install] WantedBy = multi-user.target
The server can be backed up by just backing up the files in the
directories specified in the config.yaml file. Any type of file backup can be used, e.g. periodic
rsync. The backup script can be used while the server is running as long as the backup script does not
change any files.
The server can be restarted from a backup by just placing the backup directories in the place
pointed to by
publish in the config file.
Writeurl can be embedded as described in
This page is available on the online service as well
Contributions and issues
Bugs and feature requests are appreciated and can be opened as Github issues.
We also welcome code contributions as pull requests.