# 先設定 API 位置之後登入 vmc target api.cloudfoundry.com vmc login
# 登入時會出現以下介面 Email: [輸入註冊時的電郵] Password: [輸入註冊時的位置] Successfully logged into [http://api.cloudfoundry.com]
# 之後進入到自己的專案位置 # 同時通過 NPM 安裝依賴套件 cd ~/Project/Path npm install
# 第一次新建的應用通過以下指令部署 vmc push
# 第一次時會有以下問題出現 Would you like to deploy from the current directory? [yN]: y Application Name: [ProjectName] (應用名字) Application Deployed URL: '[ProjectName] (應用名字).cloudfoundry.com'? Detected a Node.js Application, is this correct? [yN]: y Memory Reservation [Default:64M] (64M, 128M, 256M, 512M, 1G or 2G) Creating Application: OK Would you like to bind any services to '[ProjectName] (應用名字)'? [yN]: y The following system services are available 1: mongodb 2: mysql 3: postgresql 4: rabbitmq 5: redis Please select one you wish to provision: 1 Specify the name of the service [mongodb-隨機數]: Creating Service: OK Binding Service [mongodb-隨機數]: OK Uploading Application: Checking for available resources: OK Processing resources: OK Packing application: OK Uploading (2K): OK Push Status: OK Staging Application: OK Starting Application: OK