-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
1 changed file
with
30 additions
and
25 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 |
---|---|---|
@@ -1,41 +1,46 @@ | ||
# Dummy API Caller | ||
|
||
Save APIs through a frontend and call them from your server side application. | ||
Save APIs through a frontend and call them from your server side application/apiclient. | ||
|
||
## Compatibility | ||
## Requirements: | ||
|
||
Currently the application is compatible with Java 11 or above. There for JRE 11 or above must be installed in order to run the jar in local machine. | ||
Must have **Java version 11 or above** installed. For a minimal JRE to run the app you can Download **Eclipse Temurin JRE** from *[here.](https://adoptium.net/temurin/releases/?version=11)* | ||
|
||
## Running the JAR | ||
## Running The App: | ||
|
||
Download the jar from release section. Open Terminal/Cmd and run: | ||
```java -jar dummy-api-caller.jar``` | ||
The application should start on `localhost:15070`. | ||
Download the jar file from Releases section. Create a folder named 'saved-responses' in the same directory as the jar to save responses. Folder structures is as follows: | ||
|
||
### Changing properties and accessing saved files | ||
|
||
Just running the jar would use the properties inside the jar and would also save file in the jar. | ||
|
||
To change the properties, create an `application.properties` file in the same directory as the jar. The mandatory propreties for the file are below: | ||
``` | ||
response.folder.name = dummyJsonResponses | ||
base.url = localhost | ||
``` | ||
You can also add the following properties to choose the port where the application is running and the logging in the console. | ||
``` | ||
server.port=${PORT:15070} | ||
logging.level.org.atmosphere = warn | ||
dummy-api-2.0.0.jar | ||
saved-responses | ||
|_GET | ||
|_POST | ||
|_DELETE | ||
|_PUT | ||
``` | ||
Create a folder in the same directory as the jar file. The folder and the property `response.folder.name` in properties file must be kept same. | ||
Open terminal/Command Line where the jar is and type. | ||
|
||
Now the run the jar file like before and you should see your responses in the folder. | ||
```java -jar dummy-api-2.0.0.jar``` | ||
|
||
The app should start. Go to *localhost:8080* in your browser and you should see the App running. | ||
|
||
Email me at ad1whqv2q@mozmail.com for any issues that you are facing. | ||
## Properties | ||
|
||
You can find the following properties in the `application.properties` file. | ||
|
||
## Running the Application In Your IDE | ||
``` | ||
\# Misc | ||
logging.level.org.atmosphere = warn | ||
spring.mustache.check-template-location = false | ||
\# You can change these to your liking | ||
server.port=${PORT:8080} | ||
response.folder.name = saved-responses | ||
base.url = localhost | ||
server.error.include-stacktrace=never | ||
``` | ||
|
||
While developing the application, it is recommended to launch the `Application` class in debug mode from your IDE. | ||
Email [me](mailto:ad1whqv2q@mozmail.com) for any issues. | ||
|
||
After the application has started, you can view your it at http://localhost:8080/ in your browser. | ||
#### N.B. While developing the application, it is recommended to launch the `Application` class in debug mode from your IDE. |