This will generate a new GreenLightning project for us to start coding. Open up the project in your favorite IDE (such as IntelliJ IDEA or Eclipse) and navigate to the src/main/java/com.ociweb folder:
GreenLightning.java - This file is responsible for spinning up a new GreenLightning runtime and can be ignored for the rest of this tutorial.
RestServer.java - This is the main file we will work with. It will setup our HTTP server, connect behaviors and routes, and configure connection settings.
HelloField.java - This will contain enums required for field identification.
HelloStruct.java- This will contain enums for route identification.
Setting up a HTTP Server
GreenLighting allows you to use a lot of different servers - you're not just limited to HTTP. In this example, we will be using HTTP, so we need to specify and create our HTTP 1.x server.
Open up RestServer.java. It should look something like this: