Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 964 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 964 Bytes

JWebServer

A simple implementation of a web server, in Java. This application can host websites, static content, scripts, etc...

Screenshot 2024-04-28 at 6 54 17 AM

How to run it?

  1. Clone the repository in your local.
  2. Open a terminal/powershell in JWebServer directory
  3. Complie the java source files.
    javac -d src/target src/**/*.java
  4. Create a jar out of the complied files.
    jar cvf JWebServer.jar src/target/**/*.class
  5. Run the jar file by specifying the main class.
    java -cp JWebServer.jar:src/target git.chaitanyabhardwaj.jwebserver.Main
  6. This should start the application. Enter a desired port number (say, 5000).
  7. Open a web client(any web broswer or postman) and hit http://127.0.0.1:5000 or http://localhost:5000
    Congratulations🎉, your web server is now running!