Skip to content

Instantly share code, notes, and snippets.

@jacobbridges
Last active May 10, 2016 02:42
Show Gist options
  • Save jacobbridges/b1c56b83b77a8b1b32af007154e378ec to your computer and use it in GitHub Desktop.
Save jacobbridges/b1c56b83b77a8b1b32af007154e378ec to your computer and use it in GitHub Desktop.
# I don't even know where to begin.
import static spark.Spark.*;
public class HelloWorld {
public static void main(String[] args) {
// Create a route for the base endpoint
get("/", (req, res) -> "Hello World!");
}
}
mvn archetype:generate -DgroupId=com.excelmicro
-DartifactId=HelloWorld \
-DarchetypeArtifactId=maven-archetype-quickstart \
-DinteractiveMode=false \
echo "<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.5</version>
</dependency>" >> ./HelloWorld/pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment