How to Get a list of all accounts methods?

Hi,

I am not sure how to follow the following:
// Get a list of all accounts methods by running Meteor.server.method_handlers in meteor shell

Thanks

Open two command prompt windows in your application folder. In one of them start your meteor app. Once it’s running, in the other window enter meteor shell.

That will give you access to the server code:

meteor shell

Welcome to the server-side interactive shell!

Tab completion is enabled for global variables.

Type .reload to restart the server and the shell.
Type .exit to disconnect from the server and leave the shell.
Type .help for additional help.

>

At the > prompt, type Meteor.server.method_handlers and press enter. You’ll get a list of server methods - some of which will be accounts methods:

> Meteor.server.method_handlers
{ __dynamicImport: [Function: __dynamicImport],
  '/users/insert': [Function],
  '/users/update': [Function],
  '/users/remove': [Function],
  login: [Function],
  logout: [Function],
  logoutOtherClients: [Function],
  getNewToken: [Function],
  removeOtherTokens: [Function],
  configureLoginService: [Function],
  changePassword: [Function: changePassword],
  forgotPassword: [Function: forgotPassword],
  resetPassword: [Function: resetPassword],
  verifyEmail: [Function: verifyEmail],
  createUser: [Function: createUser],
  '/meteor_accounts_loginServiceConfiguration/insert': [Function],
  '/meteor_accounts_loginServiceConfiguration/update': [Function],
  '/meteor_accounts_loginServiceConfiguration/remove': [Function] }
>

You can close the shell with CTL-D.

2 Likes

Thanks it is like running meteor mongo.
What is the meteor shell good for?
Is it only for testiong Meteor.methods?

You can inspect, modify and execute server code.

1 Like