Appendix A. Appendix
This appendix contains a list of Meteor's command-line tool commands and a short description of iron:router
hooks.
List of Meteor's command-line tool commands
Option |
Description |
---|---|
|
Using
|
|
This will initialize a Meteor project by creating a folder with the same name with some initial files. |
|
This will update our current Meteor app to the latest release. We can also use |
|
This will deploy our Meteor app to We can pass the |
|
This will create a folder with our bundled app(s) code ready to be deployed on our own server. |
|
This will add or remove a Meteor core package to/from our project. |
|
This will list all Meteor packages our app is using. |
|
This will give us access to our local MongoDB shell. We need to also have our application started with If we need access to the mongo database of a app deployed on meteor.com, use But be aware that these credentials are only valid for 1 minute. |
|
This will reset our local development database to a fresh state. This won't work when our application is running. Be aware that this will remove all our data stored in our local database. |
|
This will download and display the logs for an app we deployed at |
|
This searches for Meteor packages and releases, whose names contain the specified regular expression. |
|
This shows more information about a specific package or release: name, summary, the usernames of its maintainers, and, if specified, its home page and Git URL. |
|
This publishes our packages. We must before go to the package folder using the cd command, log in to our Meteor account using To publish a package for the first time, we use |
|
This publishes a build of an existing package version from a different architecture. Our machine must have the right architecture to be able to publish for a specific one. Currently, the supported architectures for Meteor are 32-bit Linux, 64-bit Linux, and Mac OS. The servers for Meteor |
|
This publishes a release of Meteor. This takes in a JSON configuration file. For more detail, visit https://docs.meteor.com/#/full/meteorpublishrelease. |
|
This claims a site deployed with an old Meteor version with our Meteor developer account. |
|
This logs us in to our Meteor developer account. |
|
This logs us out of our Meteor developer account. |
|
This prints the username of our Meteor developer account. |
|
This will run tests for one or more packages. For more information, refer to Chapter 12, Testing with Meteor. |
|
This catches for miscellaneous commands that require authorization to use. Some example uses of meteor |
The iron:router hooks
The following table contains a list of router controller hooks:
|
This function can overwrite the default behavior of the route. If we define this function, we have to manually render the template using |
|
This function runs before the route gets rendered. Here, we can put extra custom actions. |
|
This function runs after the route gets rendered. Here, we can put extra custom actions. |
|
This function runs once when the route is first loaded. This function doesn't run again on a hot code reloads or when the same URL is navigated again. |
|
This function will be called every time the route is called. |
|
This function runs once when leaving the current route to a new route. |
|
This function can return subscription(s) that affect |
|
This function can return subscription(s), but will automatically render the |
|
The return value of this function will be set as the data context of this routes template. |
A full explanation of these hooks can be found at the following resources: