Where to put methods now that /imports/api/ doesn't work anymore?

Every version of Meteor breaks the file structure. Now it won’t accept my methods in /imports/api/ because the server can’t read that location. Do we always need to define methods in the server folder now?

Their guide doesn’t mention anything about this because it’s utterly useless since 1.3.

There have been no breaking changes in Meteor’s file structure since at least v1. There have been opt-in changes, but there’s always been backwards compatibility. V1.7 will introduce another opt-in structure, but that’s not out yet.

/imports/api works for me, so I suspect you’re doing something wrong in your code.

Please share your file structure and the breaking code, so we can help you.

4 Likes

You might have just forgotten to import the methods in a file that loads on the server.

1 Like