Merge pull request #878 from 'awwx/clarify-startup-docs' into devel

This commit is contained in:
Chris Mather
2013-03-26 14:33:13 -07:00

View File

@@ -16,8 +16,14 @@ on the client, just on the server, or *Anywhere*.
On a server, the function will run as soon as the server process is
finished starting. On a client, the function will run as soon as the DOM
is ready and any `<body>` templates from your `.html` files have been
put on the screen.
is ready.
The `startup` callbacks are called in the same order as the calls to
`Meteor.Startup` were made.
On a client, `startup` callbacks from smart packages will be called
first, followed by `<body>` templates from your `.html` files,
followed by your application code.
// On server startup, if the database is empty, create some initial data.
if (Meteor.isServer) {