meteor 1.3: project architecture is:
- .meteor
- both
- articles.js
- tags.js ...
- client
- templates
- templates.html
- templates.js
- server
- main.js
i want use collection both checks in client , in server use:
import { collectionname } "path/to/collection"
both on client side , server side
in collection file have:
export const collectionname = new mongo.collection("collection");
i've tried global.collection name, without word before collection name before meteor 1.3 -> still :
exception sub articles id 2irsgekwincgvb33z referenceerror: articles not defined
if use import './../both/collections/collectionname';
collectionname not defined;
if want use import
, you'll need put code under imports
directory. see application structure section of guide. in particular, read file structure section example layout.