Apollo project is a project template. It can be used with the project-x project generator.
$ npm install --save apollo-project
The name of the project root folder. This will be the artifactId too.
The groupId int the pom.xml.
The root package of the java application.
The beginning of the service class.
The name of the service method.
The port number, where the service started.
const {apolloProject} = require('apollo-project');
const {project} = require('project-x');
var projectTemplate = apolloProject(
{
'name': 'hello-app',
'groupId': 'com.foldik',
'package': 'com.foldik.example',
'serviceName': 'Greeting',
'method': 'hi',
'port': '8787'
}
);
project(projectTemplate).build();
hello-app/
pom.xml
src/
main/
java/
com.foldik.example/
App.java
module/
Module.java
service/
GreetingService.java
logger/
Logger.java
resources/
hi.conf
Now you can build the project with maven and start the application.
$ mvn clean package
$ java -jar target/hello-app-1.0-SNAPSHOT.jar
You can reach the service on localhost:8787/hi
ISC