Amir Samakar
Amir Samakar

Reputation: 505

Create a Meteor App on Cloud9

Cloud9 is the only online IDE recommended for Meteor in meteor.com. But the 'two clicks to awesome' guide is not applicable, because Meteor is not listed in workspace types any more. What's the best way to create a Meteor app on Cloud9?

Upvotes: 1

Views: 777

Answers (3)

kapil
kapil

Reputation: 1749

Install Meteor after creating new workspace.

username:~/workspace $ curl https://install.meteor.com/ | sh

Create new app my-app.This will create a blank app.

username:~/workspace $ meteor create my-app  

Change current directory to created app.

username:~/workspace $ cd app-name       

Install node packages required for meteor app.

username:~/workspace/app-name $ meteor npm install

Run you meteor app using port option.

username:~/workspace/app-name $ meteor --port $IP:$PORT

First time it takes around 15 minutes to get up and running. After that it will run quickly every time. You need to use --port option specifically for Cloud9 as it does not support automatic ports.

Upvotes: 1

Amir Samakar
Amir Samakar

Reputation: 505

I tested the following procedure and it works:

  1. Go to https://c9.io/new and create a Blank workspace.
  2. Run curl https://install.meteor.com/ | sh in command line to install Meteor.
  3. Run meteor create my_cool_app. (Don't put ~/ before the app name.)
  4. Run cd/my_app
  5. Run meteor --port $IP:$PORT to start the sample app. (Without $IP:$PORT it hangs). Make sure the app is working.
  6. If you want to upload your app to the new directory, delete all files and folders in my_app directory.
  7. Click on my_app name on the right pane. Then in the "File" menu, click on upload files.
  8. Make sure you have a list of packages that needs to be installed. You can use meteor list on your previous working directory.
  9. First use meteor add and meteor remove commands to add/remove the MDG packages. If you install 3rd party packages first, you'll get weird errors.
  10. Add 3rd part packages.
  11. Run meteor --port $IP:$PORT to start your app. The first time it may take a few minutes to start the app but later it'll be a few seconds.

Upvotes: 2

Tristan
Tristan

Reputation: 3578

It definitely can be done!

First you're going to create a blank workspace environment in Cloud9

Create a blank environment

Second you're going to install meteor with

curl https://install.meteor.com/ | sh

Install Meteor

Then just create your project and run with Meteor!

Run with Meteor!

Upvotes: 2

Related Questions