Giter VIP home page Giter VIP logo

cf-meteor-buildpack's Introduction

Cloud Foundry Meteor Buildpack

##Create a sample app with 'meteor'

% meteor create --example leaderboard
leaderboard: created.

To run your new app:
   cd leaderboard
   meteor

##Initial deploy of your app

We need to do an initial deploy of our app to Cloud Foundry so the app environment and bound services can be modified in following steps.

% cf push leaderboard -b https://github.com/cloudfoundry-community/cf-meteor-buildpack.git --no-start

This will not start the app, it will only upload the app. We will need to create a database to make the example app work.

##Start your Cloud Foundry app

To bind a Mongo service to our app we will look into the Cloud Foundry marketplace, create a mongo service instance and then bind that instance to our app.

There are two options, you can use MongoDB or Mongolab.

###MongoDB

% cf marketplace
Getting services from marketplace in org cs-home / space development as [username]...
OK

service   plans   description
mongodb   100    MongoDB NoSQL database

% cf create-service mongodb 100 leaderboard-mongodb
Creating service leaderboard-mongodb in org cs-home / space development as [username]...
OK

% cf services
Getting services in org cs-home / space development as [username]...
OK

name               service   plan   bound apps
leaderboard-mongodb   mongodb   100

% cf bind-service leaderboard leaderboard-mongodb
Binding service leaderboard-mongodb to app leaderboard in org [org] / space development as [username]...
OK
TIP: Use 'cf restage' to ensure your env variable changes take effect

% cf start leaderboard
Starting app leaderboard in org [org] / space development as [username]...
...
1 of 1 instances running

App started
...

###MongoLab

% cf marketplace
Getting services from marketplace in org cs-home / space development as [username]...
OK

service   plans   description
mongolab  sandbox    MongoDB NoSQL database

% cf create-service mongolab sandbox leaderboard-mongolab
Creating service leaderboard-mongolab in org cs-home / space development as [username]...
OK

% cf services
Getting services in org cs-home / space development as [username]...
OK

name               service   plan   bound apps
leaderboard-mongolab   mongolab   sandbox

% cf bind-service leaderboard leaderboard-mongolab
Binding service leaderboard-mongolab to app leaderboard in org [org] / space development as [username]...
OK
TIP: Use 'cf restage' to ensure your env variable changes take effect

% cf start leaderboard
Starting app leaderboard in org [org] / space development as [username]...
...
1 of 1 instances running

App started
...

Now the leaderboard app should be running on Cloud Foundry. Go to your ROOT_URL, http://leaderboard.[CF Domain URL] in a 2 browsers and watch updates show up on the other browser immediately via web sockets to Cloud Foundry app.

cf-meteor-buildpack's People

Contributors

adelevie avatar afeld avatar csterwa avatar jsloyer avatar kossoy avatar shinji62 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.