Last active
August 29, 2015 13:56
-
-
Save oravecz/8964227 to your computer and use it in GitHub Desktop.
EJS - 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
var {Application} = require( 'stick' ); | |
var response = require( 'ringo/jsgi/response' ); | |
var app = exports.app = new Application(); | |
app.configure( 'route' ); | |
app.get( '/', function ( req ) { | |
return response.html( '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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>io.ejs.ex</groupId> | |
<artifactId>hello-world</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<jetty-version>8.1.14.v20131031</jetty-version> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>org.ringojs</groupId> | |
<artifactId>ringojs</artifactId> | |
<version>0.10.1.6</version> | |
</dependency> | |
<dependency> | |
<groupId>org.ringojs</groupId> | |
<artifactId>stick</artifactId> | |
<version>0.3.0.3</version> | |
</dependency> | |
</dependencies> | |
<repositories> | |
<repository> | |
<id>repo.ejs.io</id> | |
<url>http://repo.ejs.io/releases/</url> | |
</repository> | |
</repositories> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.mortbay.jetty</groupId> | |
<artifactId>jetty-maven-plugin</artifactId> | |
<version>${jetty-version}</version> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
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
git clone https://github.com/Transcordia/ejs.git | |
cd ejs/hello-world | |
mvn clean jetty:run |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
id="WebApp_ID" version="3.0"> | |
<servlet> | |
<servlet-name>ringo</servlet-name> | |
<servlet-class>org.ringojs.jsgi.JsgiServlet</servlet-class> | |
</servlet> | |
<servlet-mapping> | |
<servlet-name>ringo</servlet-name> | |
<url-pattern>/*</url-pattern> | |
</servlet-mapping> | |
</web-app> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment