Sample Sinatra App with MongoDB for App42 PaaS Platform
- Setup infrastructure for required environment
- Create service
- Deploy a Sinatra application
$ app42 setupInfra
$ app42 createService
DB Configure for Production environment (application_root_dir/app.rb)
# Production
config.sessions = {
:default => {
:hosts => ["<host>:<port>"], # VM IP and VM Port
:database => "<database name>", # Database Name
:username => '<username>', # User Name
:password => '<password>' # Password
}
$ app42 deploy
$ app42 appInfo --app AppName
Visit your application: