Build a rest service from the command line, as simple as “every request has a response.”

  • A url path /ping.
  • GET verb http.
  • Receiving a req and res object from request.
  • Which finally return a response, a simple string “pong”.
  • slf4j-api
  • spark-core
  • javax.servlet-api
  • jetty-server
  • jetty-util
  • jetty-http
  • jetty-io
  • log4j-slf4j-impl
  • log4j-api
  • log4j-core
  1. Pong to my ping needed.
  2. Creating a standar rest services.
  3. Using a method of a knowing library.
  4. Add it and test it.
  5. Problem happened(missing libraries).
  6. Adding missing libraries.
  7. Problem fixed.
  8. I got my pong trought rest service.
  • java run .class and .java files.
  • -cpindicate compiled folders directory(classpath).
  • curl command to execute transfer to or from a server.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Thinking Out Code

Thinking Out Code

Software engineer sharing stories & ideas on performant coding development, dev tools’ effective use’s & software development’s life experiences.🧠&♥ involved.