A Rest API developed with rust for ADempiere, this backend use gRPC for connect with adempiere-middleware and publish all endpoints using Rest API.
This backend was developed over salvo.rs as framework.
You are free of contribute with us for improve it.
apt install -y protobuf-compiler
$ protoc --version # Ensure compiler version is 3+
This project ewas developed over rust language and if you need run it just need run the follow commands
git clone https://github.com/erpya/adempiere_backend_rs
cd adempiere_backend_rs
cargo build
cargo run --bin server
2023-03-09T20:12:09.714Z INFO [server] Server Address: "0.0.0.0:7878"
2023-03-09T20:12:09.714Z INFO [server] └──!NULL!
├──entities
│ ├──[POST] -> server::v1/create_entity
│ ├──[PATCH] -> server::v1/update_entity
│ └──[DELETE] -> server::v1/delete_entity
└──process
└──[POST] -> server::v1/run_process
To use this Docker image you must have your Docker engine version greater than or equal to 3.0.
MIDDLEWARE_HOST
: Middleware host for use adempiere as gRPC server. Defaulthttp://0.0.0.0:50059
TZ
: (Time Zone) Indicates the time zone to set in the nginx-based container, the default value isAmerica/Caracas
(UTC -4:00).
You can download the last image from docker hub, just run the follow command: You can build images using the follow command
docker build -t adempiere-backend-rs -f docker/Dockerfile .
After build just run it
docker run -d -p 7878:7878 --name adempiere-backend -e MIDDLEWARE_HOST="http://0.0.0.0:50059" openls/adempiere-backend-rs
See all images here
You can also run it with docker compose
for develop enviroment. Note that this is a easy way for start the service with PostgreSQL and middleware.
docker compose version
Docker Compose version v2.16.0
Just go to docker-compose
folder and run it
cd docker-compose
docker compose up
The follow is a curl calling for create a Device
- Table Name: M_Product_Class
- Value: 0d005e89-42e0-4dd0-bbb7-af6b4212da6c
- Name: Test from Rest API
- IsDefault: false
- Description: Test
curl --location '0.0.0.0:7878/v1/entities' \
--header 'Authorization: Bearer <Token>' \
--header 'Content-Type: application/json' \
--data '{
"entity": {
"table_name": "M_Product_Class",
"attributes": [
{
"key": "Value",
"string_value": "0d005e89-42e0-4dd0-bbb7-af6b4212da6c",
"value_type": "STRING"
},
{
"key": "Name",
"string_value": "Test from Rest API",
"value_type": "STRING"
},
{
"key": "IsDefault",
"boolean_value": false,
"value_type": "BOOLEAN"
},
{
"key": "Description",
"string_value": "Test",
"value_type": "STRING"
}
]
}
}'
See all endpoints here