ummo93/EasyWeb


EasyWeb (modern wrapper for com.sun.net.httpserver). EasyWeb is easiest web framework with a minimal number of dependencies inspired by ExpressJS. Founded on com.sun.net.httpserver package. http://luniverse.herokuapp.com/

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.ummo93:EasyWeb:1.1.0'
	}
	dependencies {
		implementation("com.github.ummo93:EasyWeb:1.1.0")
	}
	<dependency>
	    <groupId>com.github.ummo93</groupId>
	    <artifactId>EasyWeb</artifactId>
	    <version>1.1.0</version>
	</dependency>

                            
    libraryDependencies += "com.github.ummo93" % "EasyWeb" % "1.1.0"
        
        

                            
    :dependencies [[com.github.ummo93/EasyWeb "1.1.0"]]
        
        

Readme


EasyWeb (modern wrapper for com.sun.net.httpserver)

Repo

EasyWeb is easiest web framework with a minimal number of dependencies inspired by ExpressJS. Founded on com.sun.net.httpserver package.

Requirements and dependencies

  • Java 8
  • Maven
  • Freemarker (http://freemarker.org/)
  • GSON for json parsing (https://github.com/google/gson)

Installation as maven dependency

In pom.xml file there should be an instruction containing the repository address:

   <repositories>
       <repository>
           <id>jitpack.io</id>
           <url>https://jitpack.io</url>
       </repository>
   </repositories>

And a dependency name in dependencies section:

	<dependency>
	    <groupId>com.github.ummo93</groupId>
	    <artifactId>EasyWeb</artifactId>
	    <version>1.1.0</version>
	</dependency>

Getting started

import static com.appartika.easyweb.Core.*;

public class Main {
    public static void main(String[] args) {
    
        get("/", (req, res) -> res.send("ok", 200));
	
        listen(5000);
    }
}

For details, use the wiki:

License

MIT