Skip to content

Commit

Permalink
Document local deployment of the search page
Browse files Browse the repository at this point in the history
The existing README.md file was just a template created in the very beginning of the GitHub RSpec project. It is severely outdated. I've recovered the proper deployment sequence.
  • Loading branch information
necto authored Apr 10, 2024
1 parent 10b4c2c commit e1e31dc
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 52 deletions.
50 changes: 50 additions & 0 deletions frontend/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

= Search page for the rule repository

This is a single-page React application that indexes the rule repository and
allows you to run flexible search through all of the rules and rule drafts,
and render the rule specifications in HTML.
The render is not guaranteed to match the rule rendering in the products,
but it is a good proxy.

== Local deployment

Make sure you have NodeJs and `npm` available. Tested with NPM v10.2.3 and NodeJS v18.19.0.

Install dependencies

[source,shell]
----
npm install
----

If you have some non-js dependencies missing, this might fail.
Possibly missing non-js dependencies include OpenSSL, libuv, libssh2, KRB5.

Once you succeed in installing the dependencies you are ready to predeploy.

[source,shell]
----
npm run predeploy
----

This command builds the database of the rule specifications.

NOTE: If the script fails to clone or fetch due to an SSL certificate failure
and your network uses a custom CA certificate you might need to make sure it is installed
in the accessible place.
As a workaround you can https://github.com/nodegit/nodegit/issues/1742[disable the certificate check].

NOTE: In the predeploy step (specifically the `prepare-rules` part of it) the script fetches all the open PRs locally.
You might want to set `GITHUB_TOKEN` to your personal GitHub token
to avoid GitHub throttling your requests during the predeploy stage.


Now you can run it locally:

[source,shell]
----
npm start
----

This should open https://localhost:3000/rspec in your default browser with the rule search page.
52 changes: 0 additions & 52 deletions frontend/README.md

This file was deleted.

0 comments on commit e1e31dc

Please sign in to comment.