Skip to content

Instantly share code, notes, and snippets.

Zoltan Altfatter altfatterz

Block or report user

Report or block altfatterz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View heroku login
$ heroku login
$ heroku keys:add ~/.ssh/id_rsa.pub
View deploy to heroku
$ heroku create // automatically adds a git remote named “heroku”
$ git push heroku master
$ heroku logs // check if the application starts up successfully
View Procfile
web: java $JAVA_OPTS -jar target/*.jar
View start
$ mvn clean install
$ java -jar target/*.jar // will start on 8080, with --port=<PORT> you can customize
$ curl http://localhost:8080/greeting?name=Zoltan
$ Hello Zoltan
View clone spring-boot-heroku
$ git clone https://github.com/altfatterz/spring-boot-heroku.git
View heroku finished
$ heroku ps:scale web=0 //scale the web dynos down to zero which effectively takes all your app http-processes offline
$ heroku logout
View application.js
var request = { url: document.location.toString() + 'event',
contentType : "application/json",
logLevel : 'debug',
transport : 'websocket',
fallbackTransport : 'long-polling' ,
trackMessageLength : true,
reconnectInterval : 5000,
enableXDR: true,
timeout : 60000,
headers : {sessionId : sessionId} // 0 for firefox, 1 for chrome, 2 for IE
View run.sh
git clone https://github.com/altfatterz/atmosphere-fun
cd atmosphere-fun
mvn clean install
mvn jetty:run
View atmosphere message
public class Message {
private Event event;
private String sessionId;
private long time;
}
You can’t perform that action at this time.