• Modules
    • By category
    • By name
    • Most popular
    • Most downloaded
    • Repository
  • Register
  • Log in
  • Help
    • Start using Ceylon Herd
    • Publish your first module
    • Module publishing guidelines
    • All about Ceylon
    • Keyboard Shortcuts

    • s Focus search module bar
      ? Open this information panel
      j Move selection down
      k Move selection up
      enter Open current selection
Module info
Name
vietj / cayla / 0.2.0
Deprecated : see io.cayla.web
Backends JVM
Maven coordinates
Compatible Ceylon release JVM: 1.0.0 (outdated)
Published Nov 18, 2013
Stats Downloads (JVM): 529
Source downloads: 471
Description

The Cayla Web Framework

Cayla makes easy creating web application with Ceylon.

Creating a simple application in seconds

Import the Cayla module

module my.module "1.0.0" {
  import cayla "0.2.0";
}

Write the controller

import cayla { ... }

object controllers {
  route("/")
  shared class Index() extends Controller() {
    shared actual default Response handle() => ok().body("Hello World");
  }
}

shared void run() {
  value application = Application(controllers);
  application.start().always((Runtime|Exception arg) => print(arg is Runtime then "started" else "failed: ``arg.string``"));
  process.readLine();
}

Build and run!

> ceylon compile my.module
...
> ceylon run my.module/1.0
started
Dependencies
ceylon.net/1.0.0 shared
java.base/7 JDK shared
vietj.vertx/0.3.0 shared
Usage
  • Import
  • Run from command-line
  • Run from Ant
 import cayla "0.2.0";
$ ceylon run cayla/0.2.0
<property name="ceylon.home" value="…"/>
<property name="ceylon.ant.lib" 
  value="${ceylon.home}/lib/ceylon-ant.jar"/>
<path id="ant-tasks">
  <pathelement path="${ceylon.ant.lib}"/>
</path>
<typedef resource="com/redhat/ceylon/ant/antlib.xml" classpathref="ant-tasks"/>

<target name="run">
  <ceylon-run module="cayla/0.2.0"/>
</target>
Module links Members
Imported By
Home
Code repository
Issue tracker
Browse
Download .car
No .js archive
Download source archive
Download module documentation
View API documentation

Ceylon Herd v1.24 Copyright 2012-2023 Red Hat. About