-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document local deployment of the search page
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
Showing
2 changed files
with
50 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file was deleted.
Oops, something went wrong.