- Meteor - Best Practices
- Meteor - ToDo App
- Meteor - Running on mobile
- Meteor - Deployment
- Meteor - Structure
- Meteor - Publish & Subscribe
- Meteor - Package.js
- Meteor - Methods
- Meteor - Accounts
- Meteor - Sorting
- Meteor - Security
- Meteor - Assets
- Meteor - Email
- Meteor - HTTP
- Meteor - EJSON
- Meteor - Timers
- Meteor - Blaze
- Meteor - Check
- Meteor - Core API
- Meteor - Packages
- Meteor - Tracker
- Meteor - Session
- Meteor - Events
- Meteor - Forms
- Meteor - Collections
- Meteor - Templates
- Meteor - First Application
- Meteor - Environment Setup
- Meteor - Overview
- Meteor - Home
Meteor Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Meteor - Structure
Meteor offers some special folders that can help the developers’ in structuring their apps.
cpent
If you create a cpent folder, everything inside this folder will be run on the cpent side. This is the folder where you can place your HTML, CSS, and cpent side JavaScript. You should place Meteor.subscribe functions, templates, helpers, and events inside this folder. Note, you don t need to run the Meteor.isCpent function in the files that are placed inside the cpent folder.
server
Files from this folder will only be run on the server side. This is the place where methods, Meteor.Pubpsh() functions, and other sensitive data should be held. All of the authentication data should be held here. You don t need to use Meteor.isServer() for the files inside this folder.
pubpc
This is the place where you should place your images, favicons, and all the other data that is served to the cpent.
private
Files from this folder can be accessed only from the server. They will be hidden from the cpent. You can put JSON or EJSON files that only the server will use inside this folder.
cpent/compatibipty
Some JavaScript pbraries export variables as globals. Use this folder for files that need to be executed without being wrapped in a new variable scope.
The rest
The rest of the folders can be structured the way you want. The code that is placed outside of the folders mentioned above will be executed on the cpent and the server side. This is a good place where you can define your models.
Load Order
It is always good to know load order of the files. The following pst is taken from the Meteor Official Documentation.
HTML template files are always loaded before everything else
Files beginning with main. are loaded last
Files inside any pb/ directory are loaded next
Files with deeper paths are loaded next
Files are then loaded in an alphabetical order of the entire path