package br.com.alura.lojinha;
import java.io.IOException;
import java.net.URI;
import org.glassfish.grizzly.http.server.HttpServer;
import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
import org.glassfish.jersey.server.ResourceConfig;
public class Servidor {
public static void main(String[] args) throws IOException{
ResourceConfig config = new ResourceConfig().packages("br.com.alura.lojinha");
URI uri = URI.create("http://localhost:8080/");
HttpServer server = GrizzlyHttpServerFactory.createHttpServer(uri, config);
System.out.println("Servidor rodando");
System.in.read();//espera dar enter para sair do servidor
server.stop();
}
}