Skip to content

lovisaberggren/SimpleRestApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleRestApi

A simple REST API written in Java, using Jakarta and Tomcat web server. The server has one endpoint, /ping, which responds with a "pong!" message. Feel free to clone this project and use it as a template for a RESTful API server project.

This setup is inspired by this tutorial.

Prerequisites

  • IntelliJ (preferred editor)
  • JDK
  • Tomcat
  • A web browser

Set up

  1. Clone the repo, and open the project in IntelliJ
  2. Open the settings and ensure the "Application Servers" settings includes Tomcat
  3. Open the Run/Debug Configurations. Ensure Tomcat is the selected application server, and that the port is set to 3000, or any port of your choice. These configurations are stored in a project file in .idea/runConfigurations and should work out of the box
  4. Run the application through the run button in the editor

The /ping endpoint should open automatically in your default browser, if not, visit http://localhost:3000/SimpleRestAPI_war_exploded/api/ping.

About

A simple REST API in Java with Jakarta and Tomcat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages