gijswijs / scala-play-starter

Starter project for Scala, Play – Works with any prismic.io repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Starter project for Play with Scala

This is a blank Play framework project that will connect to any prismic.io repository, and trivially list its documents. It uses the prismic.io Scala development kit, and provides a few helpers to integrate with the Play framework.

Getting started

####prerequisites for a windows development machine Install Java Development Kit 7 (easiest to do with chocolatey)

choco install jdk.install

Install typesafe activator. You could try Chocolatey, but I didn't test that. Otherwise follow the manual from typesafe: http://typesafe.com/get-started

choco install play

Add path to activator folder to you path environment variable

Install Ruby

choco install ruby

(if needed, fix the SSL problem: http://stackoverflow.com/questions/15305350/gem-install-fails-with-openssl-failure/27534629#27534629)

Install Bundler

gem install bundler

Run bundler (while in the project's root directory, where the gemfile lives)

bundler install

Launch the starter project

Fork this repository, then clone your fork, and run your play application using either the play run or the sbt run command. Then, open your browser at http://localhost:9000/

Your Play starter project is now up and running! However, by default, it will list and display documents from our "Les Bonnes Choses" example repository.

Configure the starter project

Edit the conf/application.conf file to make the application point to the correct repository:

# Prismic.io
# ~~~~~

# API endpoint
prismic.api="https://lesbonneschoses.prismic.io/api"

# If specified this token is used for all "guest" requests
# prismic.token="xxx"

# OAuth2 configuration
# prismic.clientId="xxxxxx"
# prismic.clientSecret="xxxxxx"

To set up the OAuth configuration and interactive signin, go to the Applications panel in your repository's settings, and create a new OAuth application. You simply have to fill in an application name and potentially the callback URL (localhost URLs are always authorized, so at development time you can omit to fill in the Callback URL field). After submitting, copy/paste the clientId & clientSecret tokens into the proper place in your configuration.

Get started with prismic.io

You can find out how to get started with prismic.io on our prismic.io developer's portal.

Understand the Play with Scala development kit

You'll find more information about how to use the development kit included in this starter project, by reading its README file.

Contribute to the starter project

Contribution is open to all developer levels, read our "Contribute to the official kits" documentation to learn more.

Licence

This software is licensed under the Apache 2 license, quoted below.

Copyright 2013 Zengularity (http://www.zengularity.com).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Starter project for Scala, Play – Works with any prismic.io repository


Languages

Language:Scala 79.7%Language:CSS 10.3%Language:Ruby 10.0%