
The CWRC-GitServer is a node.js Express server acting as a proxy between cwrc-git-dialogs and the GitHub API. The CWRC-GitServer in turn invokes CWRC-Git which is used to make the actual calls to GitHub.
CWRC-GitServer provides http endpoints for listing, creating, and updating XML documents.
The CWRC-GitWriter Sandbox is running an instance of CWRC-GitWriter, which uses the code from CWRC-WriterBase and cwrc-git-dialogs. There is a corresponding server component running this code and using the CWRC-Git module. The same code is easily (for someone with modest development experience) installed on any server to run your own instance. If you are looking to put together your own CWRC-Writer, CWRC-GitWriter is a good place to start.
These are the steps we've used to install the sandbox version of the CWRC-GitWriter:
Install node.js on a server (one approach for ubuntu is described here: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)
Clone this repository to the server, or copy the files to the server.
On the server switch into the CWRC-GitServer directory and run:
npm install (to install the npm packages on the server)
Install pm2 to run Express.js as a service:
sudo npm install pm2 -g
cd ~/cwrcserver
pm2 start ./bin/www
Next you'll need to create an OAuth app so that CWRC-GitServer can access GitHub on behalf of the user.
Once you have the client ID and client secret for your OAuth app, you'll need to edit the config.js file. The following fields need to customized:
github_client_cors
Set to true if CWRC-GitServer is at a different origin than CWRC-GitWriter.
github_client_origin
The origin for CWRC-GitWriter (used if github_client_cors is true).
github_client_id
The client ID for your OAuth app.
github_client_secret
The client secret for your OAuth app.
github_oath_callback
The URL that GitHub should redirect to, after the user authorizes the OAuth app. It should lead to the github/callback route as seen here.
github_oath_callback_redirect
The URL that CWRC-GitServer should redirect to, after handling the OAuth callback. It should lead to your installation of CWRC-GitWriter.
You will also have to install the CWRC-GitWriter code on the server, as explained in its README.
Content type
Image
Digest
Size
381.8 MB
Last updated
over 6 years ago
docker pull jefferya/cwrc-gitserver