App.java 521 Bytes
Newer Older
Michele Fiori's avatar
Michele Fiori committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
package SumServiceGRPC;

import io.grpc.ServerBuilder;
import java.io.IOException;

public class App
{
    public static void main( String[] args )
    {
        try {
            io.grpc.Server server = ServerBuilder.forPort(8080).addService(new SumServiceImpl()).build();
            server.start();
            System.out.println("Server started!");
            server.awaitTermination();
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}