Skip to content

SnackTank/snackhttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnackTank's Hypertext Transfer Protocol Server

A stupid simple HTTP/1.0 server written in Java
Context? There is no context, it exist because it does.
This project was designed for Java 1.8.0

How to compile

There are two diffrent ways, either A manually, or B with the provided script.
Here's the manual way if you don't trust my script:
I. Please go to the directory that contains net/
Your file manager should show something along this file structure:
'LICENSE MANIFEST.MF net README.md'
And go ahead and create an 'out' directory: mkdir out/ (Unix example)
II. run 'javac -d out/ net/snacktank/httpserver/*.java'
CD into 'out/'
Now the server can be ran by 'java net/snacktank/httpserver/WebServer' but we want a Java Archive (JAR) file.
III. run 'jar -cfm WebServer.jar ../MANIFEST.MF net/snacktank/httpserver/*.class net/snacktank/httpserver/request/*.class'
This sequence should create a JAR file that can be placed anywhere you want!

How to Run

It's pretty simple just do:
'java -jar WebServer.jar'

Behaviors

POST & PUT are disabled by default. You will need to enable them in the source code.
If POST is enabled the request will be stored as plain ASCII in a request/ sub-folder.
If no file or '/' is requested by GET, the server will return 'index.html'

Features

I. GET
II. HEAD
III. POST
IV. PUT

TODO

I. [ ] LINK
II. [ ] UNLINK
III. [ ] DELETE
IV. [ ] AUTHENTICATION

License

MIT
Copyright MMXXVI SnackTank

About

A stupid simple HTTP/1.0 server written in Java

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors