Skip to content

Instantly share code, notes, and snippets.

View mkovacek's full-sized avatar
🇭🇷

Matija Kovaček mkovacek

🇭🇷
View GitHub Profile
name := """play-scala"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
jdbc,
# This is the main configuration file for the application.
# https://www.playframework.com/documentation/latest/ConfigFile
# ~~~~~
# Play uses HOCON as its configuration file format. HOCON has a number
# of advantages over other config formats, but there are two things that
# can be used when modifying settings.
#
# You can include other configuration files in this main application.conf file:
#include "extra-config.conf"
#
[info] application - Creating Pool for datasource 'db'
[error] c.z.h.HikariConfig - either dataSource or dataSourceClassName is required
[error] application -
[info]
[info] ! @7105kp1a7 - Internal server error, for (GET) [/] ->
[info]
[info] play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [db]]
[info] at play.api.Configuration$.configError(Configuration.scala:154)
[info] at play.api.Configuration.reportError(Configuration.scala:806)
[info] at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
@mkovacek
mkovacek / README.md
Created September 8, 2016 19:36 — forked from pathikrit/README.md
My highly opinionated list of things needed to build an app in Scala
val name: String = "Scala"
//shorter
val newName = "Scala"
// you can't assign new value
newName = "Java" // Error: reassignment to val name = "Java"
var age = 23
//you can assign new values
age = 24
age = 25
val nameOfImmutableVariable: type = value
var nameOfMutableVariable: type = value
def methodName (argument: argumentType): returnType = {
//body of the method
}
def printHelloWorld: Unit = {
println("Hello world")
}
def sum(a: Int, b: Int): Int = {
a + b
}