This repository contains the backend created to the project Freeboard. The project is associated to the Subject Cloud Computing.
To create the local MySQL database:
-
Go to MySQL Workbench and create a new connection
port: 3303 user: root password: root
-
Create a database called 'freeboardv1'.
-
Import the freeboard.mwb model via Forward Engineer in the Database options.
To build the project:
mvn compile
mvn datanucleus:enhance
mvn clean package
To generate the required configuration file openapi.json
:
mvn endpoints-framework:openApiDocs
To run the backend API:
-
Run the API implementation code by invoking:
mvn appengine:run
The first time you upload a sample app, you may be prompted to authorize the deployment. Follow the prompts: when you are presented with a browser window containing a code, copy it to the terminal window.
-
Wait for the upload to finish.
After you deploy the API and its configuration file, you can send requests to the API.
To test the API, go to
localhost:8080/_ah/api/explorer
To test te DoPayment Servlet, use Postman and go to
localhost:8080/payment