In this article I'll introduce to you one of my newest app called mini-http-server. I developed it for myself first, but then I make it open source through GitHub for helping other Angular JS ( or other JS framework) developers.
Let's see the installation! Open your web browser and go to the GitHub project site https://github.com/szrnka-peter/mini-http-server/releases. Download the JAR file and the related config.properties file, and additionally the run.bat file if you need it. Open the config, and customize it for your needs.
HTTP
It'll be enough to fill the first 3 parameters:
- server.type: HTTP in the current case
- server.port: For example: 8080, 8081, or whatever you want.
- www.dir: The directory, where your files are located.
Ok, save it, then run the JAR file with the following command:
java -jar mini-https-server.jar
(For Windows users, it's a great idea to put this in a .bat file for easier use.)
If you did everything well, you can see the following screen:
HTTPS
This mode is a bit more difficult. First, modify the server type to "HTTPS". Additionally, in HTTPS mode you must provide a keystore (jks file) for the server. There are many tutorials on the web how to create a keystore:
https://stackoverflow.com/questions/37488090/create-keystore-file-with-one-command
To configure the keystore, you must add the upcoming parameters.
https://stackoverflow.com/questions/37488090/create-keystore-file-with-one-command
To configure the keystore, you must add the upcoming parameters.
- keystore.location: Keystore file location
- keystore.password: Base64 encoded keystore password
- truststore.location: Truststore file location (same as keystore file)
- truststore.password: Base64 encoded truststore password
- password.encrypttype: Encryption type (currently only base64 allowed)
java -jar mini-https-server.jar
(For Windows users, it's a great idea to put this in a .bat file for easier use.)
If you did everything well, you can see the following screen:
And we're done!