This simple app defines a Rest API method to generate a json object with a random value.
Only one component is defined (named as "randomapi").
To install the application run the following command inside the application folder:
$ mantrad install
Then, to start the appliction, run:
$ mantrad startapp
This application defines the route http://localhost:8080/randomapi/getrandom a GET Api to retrive the json with a random value with a timestamp. To check, use a tool like Postman or just open a web browser pointing to that route.
The result has this format:
{
"success": true,
"payload": {
"randomvalue":"< 32 characters hex string with the random value >",
"timestamp": <time stamp>
}
}
To see the routes created by the app, run:
$ mantrad show-gets
Read official documentation at Mantra site.
Download demos at Mantra site demos and learn by example.
Download common Mantra components at Mantra site components.