Files
meteor/docs/client/commandline.html
2012-10-13 21:31:55 -07:00

177 lines
5.3 KiB
HTML

<template name="commandline">
<div>
{{#better_markdown}}
{{#api_section "commandline"}}Command line{{/api_section}}
<!-- XXX some intro text? -->
<h3 id="meteorhelp">meteor help</h3>
Get help on meteor command line usage. Running `meteor
help` by itself will list the common meteor
commands. Running <code>meteor help <i>command</i></code> will print
detailed help about the command.
<h3 id="meteorrun">meteor run</h3>
Run a meteor development server in the current project. Searches
upward from the current directory for the root directory of a Meteor
project. Whenever you change any of the application's source files, the
changes are automatically detected and applied to the running
application.
You can use the application by pointing your web browser at
<a href="http://localhost:3000">localhost:3000</a>. No internet connection is
required.
This is the default command. Simply running `meteor` is the
same as `meteor run`.
Run `meteor help run` to see the full list of options.
<h3 id="meteorcreate">meteor create <i>name</i></h3>
Create a new Meteor project. Makes a subdirectory named *name*
and copies in the template app. You can pass an absolute or relative
path.
<h3 id="meteordeploy">meteor deploy <i>site</i></h3>
Deploy the project in your current directory to Meteor's servers.
You can deploy to any available name
under `meteor.com` without any additional
configuration, for example, `myapp.meteor.com`. If
you deploy to a custom domain, such as `myapp.mydomain.com`,
then you'll need to make sure the DNS for that domain is configured to
point at `origin.meteor.com`.
You can deploy in debug mode by passing `--debug`. This
will leave your source code readable by your favorite in-browser
debugger, just like it is in local development mode.
To delete an application you've deployed, specify
the `--delete` option along with the site.
To add an administrative password to your deployment, include
the `--password` option. Meteor will prompt
for a password. Once set, any future `meteor deploy` to
the same domain will require that you provide the password. The same
password protects access to `meteor mongo`
and `meteor logs`. You can change the password by
running `meteor deploy --password` again,
which will first prompt for the current password, then for a new
password.
{{#warning}}
Password protection only applies to administrative actions with the
Meteor command. It does not prevent access to your deployed
website. Also, this all is a temporary hack until we have
full-featured Meteor accounts.
{{/warning}}
{{#warning}}
If you use a domain name other than `meteor.com`
you must ensure that the name resolves
to `origin.meteor.com`. If you want a top-level
domain like myapp.com, you'll need a DNS A record, matching the IP
address of origin.meteor.com.
{{/warning}}
<h3 id="meteorlogs">meteor logs <i>site</i></h3>
Retrieves the server logs for the named Meteor application.
Meteor redirects the output of `console.log()` in your
server code into a logging server. `meteor logs`
displays those logs. In client code, the output
of `console.log()` is available in your web browser's
inspector, just like any other client-side JavaScript.
<h3 id="meteorupdate">meteor update</h3>
Upgrade to the latest Meteor version. Checks to see if a new
version of Meteor is available, and if so, downloads and installs
it. You must be connected to the internet.
<h3 id="meteoradd">meteor add <i>package</i></h3>
Add packages to your Meteor project. You can add multiple packages
with one command. For a list of the available packages, run `meteor
list`.
<h3 id="meteorremove">meteor remove <i>package</i></h3>
Removes a package previously added to your Meteor project. For a
list of the packages that your application is currently using, run
`meteor list --using`.
<h3 id="meteorlist">meteor list</h3>
Without arguments, lists all available Meteor packages. To add one of
these packages to your project, run <code>meteor add <i>package</i></code>.
With `--using`, list the packages that you have added to your project.
<h3 id="meteormongo">meteor mongo</h3>
Open a MongoDB shell on your local development database, so that you
can view or manipulate it directly.
{{#warning}}
For now, you must already have your application running locally
with `meteor run`. This will be easier in the future.
{{/warning}}
<h3 id="meteorreset">meteor reset</h3>
Reset the current project to a fresh state. Removes the local
mongo database.
{{#warning}}
This deletes your data! Make sure you do not have any information you
care about in your local mongo database by running `meteor
mongo`. From the mongo shell, use `show collections`
and <code>db.<i>collection</i>.find()</code> to inspect your data.
{{/warning}}
{{#warning}}
For now, you can not run this while a development server is
running. Quit all running meteor applications before running this.
{{/warning}}
<h3 id="meteorbundle">meteor bundle</h3>
Package the application up for deployment. The output is a tarball
that includes everything necessary to run the
application. See `README` in the tarball for details.
You can use this to host a Meteor application on your own server,
instead of deploying to Meteor's servers. You will have to deal with
logging, monitoring, backups, load-balancing, etc, all of which we
handle for you if you use `meteor deploy`.
{{/better_markdown}}
</div>
</template>