Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danijeldragicevic/shippings-system-app
Simple CRUD Mule application. Connects to the remote SQL and in-memory H2 databases.
https://github.com/danijeldragicevic/shippings-system-app
crud h2-database mulesoft munit munit-h2 secured-configs sql
Last synced: 10 days ago
JSON representation
Simple CRUD Mule application. Connects to the remote SQL and in-memory H2 databases.
- Host: GitHub
- URL: https://github.com/danijeldragicevic/shippings-system-app
- Owner: danijeldragicevic
- License: apache-2.0
- Created: 2024-04-01T11:10:14.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-30T06:14:48.000Z (7 months ago)
- Last Synced: 2024-04-30T07:35:19.455Z (7 months ago)
- Topics: crud, h2-database, mulesoft, munit, munit-h2, secured-configs, sql
- Language: RAML
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shippings System App
Welcome to the Shippings System App!
# Technology
- Mule 4.6.1 EE
- MySQL database
- H2 database
- Java 8
- Maven 3.9.6# How to run the application
## 1. Provide database credentials and VM argumentsApplicaiton connects to the remote database by using the secured credentials.
To be able to run the application you have to provide your own credentials (host, port, username, password) and encrypt them.
In order to achieve that, please follow instructions on this link: https://docs.mulesoft.com/mule-runtime/latest/secure-configuration-propertiesApplication is developed to load property files based on the development environment you are working on.
To be able to run the application, you have to provide environemnt information and encryption key:
- VM argumens to run the application are: -M-Dmule-env=dev -M-Dencryption.key=YOUR_KEY_HERE
- VM argumens to run the MUnit tests are: -Dmule-env=qa -Dencryption.key=YOUR_KEY_HERE
If you need some help, please follow instructions on this link: https://docs.mulesoft.com/mule-runtime/latest/deploying-to-multiple-environments## 2. Run on Embeded Mule Runtime
Application is developed using the Anypoint Studio 7.17, with it's embedded Maven and JDK.
The easiest way to run the application is to download [Anypoint Studio](https://www.mulesoft.com/lp/dl/anypoint-mule-studio) and import application as "Anypoint Studio project from File System".## 3. Run on Mule Standalone Runtime
If you don't want to use Anypoint Studio, you can run the application using the mule CLI.
Here are the instructions how to configure Mule Standalone Runtime on your machine and run the application: https://docs.mulesoft.com/mule-runtime/latest/mule-standalone# Exposed endpoints
By default, application will run on **http://localhost:8081**
Following endpoints will be exposed:| Methods | Urls | Actions |
|---------|-----------------------------------------------|------------------------------------------------------------|
| GET | /shippings/console | API Console, opens generated documentation |
| | | |
| GET | /api/shippings | Retrieve all shippings. |
| GET | /api/shippings?name=[keyword]&match=[keyword] | Retrieve all shippings using the optional query parameters |
| POST | /api/shippings | Create a new shipping |
| | | |
| GET | /api/shippings/{id} | Get shipping specified by it's unique ID |
| PUT | /api/shippings/{id} | Update shipping specified by it's unique ID |
| DELETE | /api/shippings/{id} | Delete shipping specified by it's unique ID |# How to test the application
To test the appliactions endpoints you can use API Console.
Provides intuitive way to see what data endpoints are expecting, so as what are they returning.![api-console](https://github.com/danijeldragicevic/shippings-system-app/assets/82412662/9cad48b2-8b5d-4bf6-85f0-14980052f5a7)
Feel free to explore the application and use the provided examples to understand how to interact with each endpoint. If you have any questions or issues, please refer to the API documentation or contact the application maintainers.
# Licence
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)