Skip to content

vijayannadi/vaadin7-for-heroku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vaadin for Heroku Build Status

Easily build a Vaadin application and deploy it on Heroku.

Uses Embed for Vaadin to configure and start an embedded tomcat configured to start Vaadin and store session in memcached.

How to use it

Add the dependency to maven:

<dependency>
  <groupId>eu.hurion.vaadin.heroku</groupId>
  <artifactId>vaadin-for-heroku</artifactId>
  <version>0.4</version>
</dependency>

Then make a class with a main method to launch the server;

public static void main(final String[] args) {
    herokuServer(forApplication(YourVaadinApplication.class)).start();
}

By default, the configuration assume you're using the memcache add-on. If you prefer using the memcachier add-on, use

public static void main(final String[] args) {
    herokuServer(forApplication(YourVaadinApplication.class))
            .withMemcachedSessionManager(memcachierAddOn())
            .start();
}

Finally, make a Procfile to point to you class

web:    java $JAVA_OPTS -cp target/classes:target/dependency/* path.to.your.Launcher

For ease of development, another pre-configured server is available:

public static void main(final String[] args) {
    localServer(forApplication(YourVaadinApplication.class)).start();
}

This local server does not require memcached to be running/configured, launch on port 8080 and automatically open a browser. Best way to use it is to make another launcher in your test sources and use it from your IDE.

See hello-vaadin-heroku for a complete example.

Changelog

0.4

  • enforce consistent version of tomcat dependencies and psuh to version 7.0.29

0.3

  • added possibility to define and map filter and application listener
  • localServer and herokuServer now take a VaadinForHeroku, configure it for local/heroku and return it
  • added testServer to configure a server for usage in "unit" tests.
  • bumped to tomcat 7.0.29

About

Help easily make a vaadin project to be deployed on heroku

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%