JavaScript application that communicates (read/write) with the Editors' Notes server API. Pages can be rendered both server- and client-side.
Requires nodejs >=0.12.0
- Run an instance of an Editors' Notes server.
- Set up this repository with
npm install
- Compile the client-side application with
npm run compile
- Start the Editors' Notes server and this one (using
npm start
). The configuration currently assumes that you will be running the Editors' Notes server on port 8001. - Set up a proxy that will server static files and forward non-HTML requests. An example nginx is included below.
We use npm version
along with some pre/post scrips to release new versions. To tag a new release:
-
Make sure your master branch is tracking the upstream branch. You might need to run
git branch master --set-upstream-to=origin/master
for this to be the case. -
When you want to tag a new version from master, make sure you are up to date with the upstream branch (i.e. run
git push
and/orgit pull
) -
Run
npm version
with an argument ofmajor
,minor
, orpatch
to tag a new version. It will automatically be pushed upstream.
server {
listen 8000;
location / {
proxy_pass_request_headers on;
proxy_set_header Host $http_host;
# Forward non-html requests to the Editors' Notes server
if ($http_accept ~* "html") {
proxy_pass http://localhost:8450;
break;
}
# Forward html requests to the HTML renderer, to render templates server-side
proxy_pass http://localhost:8001;
}
# Replace with path where this repository lives
location /static/ {
root $PATH_TO_THIS_REPOSITORY/editorsnotes-renderer;
}
}