Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

merge #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions HTTPServer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

public interface HTTPServer {

}
2 changes: 1 addition & 1 deletion NumberServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class Handler implements URLHandler {
// The one bit of state on the server: a number that will be manipulated by
// various requests.
int num = 0;
int num = 1000;

public String handleRequest(URI url) {
if (url.getPath().equals("/")) {
Expand Down
3 changes: 3 additions & 0 deletions SearchEngine.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public class SearchEngine implements HTTPServer{

}
2 changes: 1 addition & 1 deletion Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void start(int port, URLHandler handler) throws IOException {
//create request entrypoint
server.createContext("/", new ServerHttpHandler(handler));

//start the server
//start the server kk
server.start();
System.out.println("Server Started! Visit http://localhost:" + port + " to visit.");
}
Expand Down