Skip to content

Instantly share code, notes, and snippets.

@timfel
Created February 22, 2012 18:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save timfel/1886415 to your computer and use it in GitHub Desktop.
RPApplication subclass: #TestApp
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'TestApp'.
echoSomething
<get: '/'>
self error: 'Shows error info about me'.
initialize
"self initialize"
Smalltalk addToStartUpList: self.
Smalltalk addToShutDownList: self.
startUp
"Start this app if running on cloud foundry"
(SmalltalkImage current getSystemAttribute: 3) ifNil: [^ self].
self
runIn: #deployment
on: (SmalltalkImage current getSystemAttribute: 3) asNumber
named: 'TestApp'.
shutDown
self services do: [:each | each stop; waitForStop].
CloudFoundry generateDroplet.
CloudFoundry new
base: 'squeak';
generateDropletWithVNC.
Installer mc directory: '.'; package: 'ConfigurationOfRatPack'; install.
((Smalltalk at: #'ConfigurationOfRatPack') project version: '1.0') load: #('default').
Installer mc directory: '.'; package: 'TestApp'; install.
(Installer ss project: 'RFB') install: 'RFB'.RFBServer start: 5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment