Skip to content
This repository was archived by the owner on Aug 5, 2024. It is now read-only.

3. New API

Timothy Voice edited this page Jun 10, 2016 · 2 revisions

####Command

meteor-maker g:api <name>

Will create a new api directory at imports/api/<name> with appropriate files. The file structure will look like this (if you name your api messenger):

  api/
    messenger/                           # a unit of domain logic
      server/
        messenger.publications.js        # all messenger-related publications
        messenger.publications.tests.js  # tests for the messenger publications
      messenger.js                       # definition of the Messenger collection
      messenger.tests.js                 # tests for the behavior of that collection
      messenger.methods.js               # methods related to messener
      messenger.methods.tests.js         # tests for those methods

####Options

-T, --no-tests Will not generate any test.js files

Clone this wiki locally