30 lines
802 B
Java
30 lines
802 B
Java
package xyz.etztech.serverapi;
|
|
|
|
import xyz.etztech.serverapi.token.Token;
|
|
import xyz.etztech.serverapi.token.TokenList;
|
|
import xyz.etztech.serverapi.token.TokenScope;
|
|
import xyz.etztech.serverapi.web.Web;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class ServerRunner {
|
|
|
|
static TokenList tokens = new TokenList(true, true, Arrays.asList(
|
|
new Token("testGET", TokenScope.GET),
|
|
new Token("testPOST", TokenScope.POST),
|
|
new Token("testAll", TokenScope.ALL),
|
|
new Token("testNone", TokenScope.NONE)
|
|
));
|
|
|
|
static List<String> custom = Arrays.asList(
|
|
"test",
|
|
"say"
|
|
);
|
|
|
|
public static void main(String[] args) {
|
|
Web web = new Web(new MockProvider());
|
|
web.start(8080, tokens, custom);
|
|
}
|
|
}
|