Repository: incubator-s2graph Updated Branches: refs/heads/master a4059dfe0 -> 653deee07
update graphiql.html url Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/12e7d985 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/12e7d985 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/12e7d985 Branch: refs/heads/master Commit: 12e7d985b07f227116bdfcde939846b8612c6602 Parents: a4059df Author: daewon <[email protected]> Authored: Wed Mar 28 12:16:09 2018 +0900 Committer: daewon <[email protected]> Committed: Wed Mar 28 12:16:09 2018 +0900 ---------------------------------------------------------------------- s2graphql/README.md | 9 +++++---- s2graphql/src/main/resources/assets/.gitignore | 1 + .../main/scala/org/apache/s2graph/graphql/HttpServer.scala | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/12e7d985/s2graphql/README.md ---------------------------------------------------------------------- diff --git a/s2graphql/README.md b/s2graphql/README.md index 040e8a9..21973d9 100644 --- a/s2graphql/README.md +++ b/s2graphql/README.md @@ -51,15 +51,16 @@ If hbase is running well, run the following command after cloning the project lo Because of the license problem, you should download the file through the following command. ```bash -cd s2graphql/src/main/resources -wget https://raw.githubusercontent.com/sangria-graphql/sangria-akka-http-example/master/src/main/resources/graphiql.html +cd s2graphql/src/main/resources/assets +wget https://raw.githubusercontent.com/daewon/sangria-akka-http-example/master/src/main/resources/assets/graphiql.html + ``` -You can see that the `graphiql.html` file is added to the `s2graphql/src/main/resources` folder as shown below. +You can see that the `graphiql.html` file is added to the `s2graphql/src/main/resources/assets` folder as shown below. ``` $ls -application.conf graphiql.html log4j.properties +graphiql.html ``` And let's run http server. http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/12e7d985/s2graphql/src/main/resources/assets/.gitignore ---------------------------------------------------------------------- diff --git a/s2graphql/src/main/resources/assets/.gitignore b/s2graphql/src/main/resources/assets/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/s2graphql/src/main/resources/assets/.gitignore @@ -0,0 +1 @@ + http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/12e7d985/s2graphql/src/main/scala/org/apache/s2graph/graphql/HttpServer.scala ---------------------------------------------------------------------- diff --git a/s2graphql/src/main/scala/org/apache/s2graph/graphql/HttpServer.scala b/s2graphql/src/main/scala/org/apache/s2graph/graphql/HttpServer.scala index d080477..9535b0e 100644 --- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/HttpServer.scala +++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/HttpServer.scala @@ -45,7 +45,7 @@ object Server extends App { (post & path("graphql")) { entity(as[spray.json.JsValue])(GraphQLServer.endpoint) } ~ { - getFromResource("graphiql.html") + getFromResource("assets/graphiql.html") } val port = sys.props.get("http.port").fold(8000)(_.toInt)
