This is a web application with a REST API, which could be used to check whether a word is a pyramid word or not.
- Java 1.8
- Maven
- Tomcat version 6 or above
- Checkout the Pyramid repository
git clone https://github.com/charitha306/Pyramid.git
- Build the module
cd Pyramid
mvn clean install
- Copy the .war file to tomcat/webapps folder
cp target/pyramid-word.war CATALINA_HOME/webapps/pyramid-word.war
- Start tomcat server
cd CATALINA_HOME/bin
sh catalina.sh start
Request
GET /pyramid-word/api/ispyramid?word=<word>
Response
| Status | Response |
|---|---|
| 200 | {"isPyramid": <true/false>} |
| 400 | {"error": "Request must contain a word" / "Invalid word - must contain only lower case letters"} |
| 500 | Internal server error |