This is a Rust app that simulates a product catalog. It is meant to be used in conjunction with the store-front and store-admin apps.
This app is a simple REST API that allows you to get a list of products, get a single product, update a product, and add a product.
Products are loaded into memory and not persisted. So if the app is restarted, the products will be reloaded.
The app does not rely on any other services, so you can run it locally without any other services running.
To run the app, clone the repo, open a terminal, and navigate to the product-service
directory. Then run the following command:
cargo run
When the app is running, you should see output similar to the following:
Finished dev [unoptimized + debuginfo] target(s) in 0.16s
Running `target/debug/product-service`
Listening on http://0.0.0.0:3002
[2023-06-28T02:44:47Z INFO actix_server::builder] starting 16 workers
[2023-06-28T02:44:47Z INFO actix_server::server] Actix runtime found; starting in Actix runtime
Using the test-product-service.http
file in the root of the repo, you can test the API. However, you will need to use VS Code and have the REST Client extension installed.