CodeHistory is a Spring Boot web application in JAR format that uses the Tomcat HTTP web server by default.
Download: zip package.
Java version 1.8.x or higher is required for CodeHistory to work. To check which version you have installed, enter the following in the console:
java -version
To launch CodeHistory, run the following in the console:
java -jar codehistory.jar
To specify the CodeHistory repository for indexing, you need to pass a parameter with the configuration for initialization:
java -jar codehistory.jar config.json
Simplest config.json
example (for the open-source PDFBox repository):
{
"REPO_PATH": "pdfbox",
"REPO_URL": "https://github.com/apache/pdfbox"
}
The repository will be automatically cloned and indexed. config.json
only needs to be specified for initialization the first time or when you want to change the configuration.
The configuration will be cached in the file CodeHistory.profile.db
, and if neither the JSON configuration file nor the environment variables are set, it will be used when launching CodeHistory.
See also: Configuration - Introduction, Configuration - Options
To specify a custom port, set the argument "server.port".
java -jar codehistory-1.0.0.jar config.json --server.port=8083
CodeHistory supports Spring Boot Actuator (it runs on port 8080 by default) and can be stopped by calling the corresponding HTTP method.
curl 'http://localhost:8080/actuator/shutdown' -i -X POST
Also, if CodeHistory is running like a regular console application, it can be stopped by pressing CTRL^C
.
The repository indexing results are stored in an automatically generated %reponame%.db
file. If you delete it manually, it will be recreated, and the repository will be reindexed.