A basic attempt to develop on Predix.io using the Scala programming language and its ecosystem of awesome libraries.
This sample app leverages on:
- Scala v.2.12.2
- SBT v.013.15
- SBT Native Packager to build application packages in native format and generate a start script for the project
- Finagle as underlying http server and client
- Circe as JSON library for Scala
- heroku-buildpack-scala for Cloud Foundry
- Create a Finagle HTTP Server
- Create a Finagle HTTP Client (based on this example) to call the Predix API Endpoint and get info on the environment
- Show an extract from that info
Cloud Foundry GE Open Sandbox: API version = 2.62.0
Be sure to have SBT installed on you machine
Make a directory for your project. Clone or download and extract the starter in that directory.
git clone https://github.com/indaco/predix-hello-scala.git
cd predix-hello-scala
sbt
> run-main WebServer
- Open the
manifest.yml
file and edit thename
for your own application - Push the app to your Predix account
$cf push
Licensed under the MIT License, see the LICENSE file.
This is not an official development from the GE Digital's Predix Team