This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.janhicken.cfwithscala | |
import scala.scalajs.js.annotation.JSExportTopLevel | |
object CloudFunctions { | |
@JSExportTopLevel("helloWorld") | |
val helloWorld: CloudFunction = (request, response) ⇒ { | |
response.status(200).send("Hello World!") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException | |
import org.eclipse.emf.ecore.EObject | |
import org.eclipse.emf.ecore.resource.Resource | |
import scala.collection.JavaConverters._ | |
import scala.reflect.ClassTag | |
class TypesafeResourceExtractor[T <: EObject : ClassTag] { | |
def extractResource(resource: Resource): T = { |