A barebones Node.js app using Express 4 and Famous.
You can deploy application with following command:
cf push
This command will use manifest file to gather all necessary options for deployment. You can also override this options in the following way:
cf push -p . -b https://github.com/cloudfoundry/nodejs-buildpack -m 256M nodejs-famous
where -p
option stands for path to folder with application or archive with application, -b
tells what buildpack should be used and -m
sets memory limit for application instances.
You can see more options that can be used for deployment in Cloud Foundry documentation.
This application uses common Node.js stack and follows rules of 12factor. That's why it is very easy to deploy and scale this application in Cloud Foundry.
---
applications:
- name: nodejsTest
memory: 256M
instances: 1
host: nodejsTest
path: .