Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 1.49 KB

README.md

File metadata and controls

12 lines (11 loc) · 1.49 KB

Foodie

An example of GraphQL server supporting Relay modern written with Play framework, Sangria and Slick.

Usage

  1. Create a database named foodie and run sbt "runMain models.mains.SlickDatabaseGenerator" to generate the required tables in it.
  2. Run sbt "runMain models.mains.GenerateSchemaGraphql" to generate the GraphQL schema in the file, ui/src/data/schema.graphql. This file is required by Relay Compiler.
  3. Run cd ui and run npm install to install the npm packages.
  4. Run npm run relay to generate the files required by Relay Babel plugin.
  5. Run npm run build to bundle JavaScript UI source code.
  6. Run npm run css to compile Sass.
  7. Run cd .. and run the web server using sbt run and go to http://localhost:9000 for the app and go to http://localhost:9000/graphiql for GraphiQL.

Note: The default database configuration is based on MySQL. You can change the database configuration in the file, conf/application.conf.