Skip to content

searchprod.com offer service that runs in the backend aggregating multiple backend APIs and services

License

Notifications You must be signed in to change notification settings

guilhebl/offer-service

Repository files navigation

Offer Service

Appendix

Running

You need to download and install sbt for this application to run.

Once you have sbt installed, the following at the command prompt will start up Play in development mode:

sbt run

Play will start up on the HTTP port at http://localhost:9000/. You don't need to deploy or reload anything -- changing any source code while the server is running will automatically recompile and hot-reload the application on the next HTTP request.

Usage

If you call the same URL from the command line, you’ll see JSON. Using httpie, we can execute the command:

http --verbose http://localhost:9000/api/v1/products

Load Testing

We've included Gatling in this test project for integrated load testing.

sbt stage
cd target/universal/stage
./bin/offer-service -Dplay.http.secret.key=some-long-key-that-will-be-used-by-your-application

Then you'll start the Gatling load test up (it's already integrated into the project):

sbt gatling:test

For best results, start the gatling load test up on another machine so you do not have contending resources. You can edit the Gatling simulation, and change the numbers as appropriate.

Once the test completes, you'll see an HTML file containing the load test chart:

 ./rest-api/target/gatling/gatlingspec-1472579540405/index.html

That will contain your load test results.

About

searchprod.com offer service that runs in the backend aggregating multiple backend APIs and services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published