An open API service indexing awesome lists of open source software.

https://github.com/hypernova1/sambastian

HTTP Server Framework
https://github.com/hypernova1/sambastian

framework java server server-framework

Last synced: 2 months ago
JSON representation

HTTP Server Framework

Awesome Lists containing this project

README

          

# Sambastian
Implementing HTTP Server Framework using java socket.

#### [document](https://hypernova1.github.io/java-http-server-doc/)
#### [Sample Project](https://github.com/hypernova1/sambastian-sample)
#### [Template](https://github.com/hypernova1/sambastian-template)

### How to use
##### 0. install jdk 1.8++
##### 1. create maven project
project structure
~~~
src/
+- main/
+- java/
| +-
+- resources/
+- config/
| +- application.properties
+- static/
+-
~~~
##### 2. add dependency
~~~xml

io.github.hypernova1
sambastian
1.0

~~~
##### 3. initial setting
filename: resources/static/resource/application.properties
~~~properties
root-package-name=[root package name] # required
server.port=[port number]
server.maximum-pool-size=[maximum thread pool size]
file-buffer-size=[file buffer size]
# activate SSL
key-store.name=[keyStore name]
key-store.password=[keyStore password]
~~~
##### 4. write main class
~~~java
@ComponentScan
public class Application {
public static void main(String[] args) {
HttpServer.start();
}
}
~~~

##### 5. execute program
~~~
22:26:34.015 [main] INFO org.sam.server.HttpServer - server started..
22:26:34.019 [main] INFO org.sam.server.HttpServer - server port: 8080
~~~