meteor Flashcards

1
Q

meteor: To run your app on localhost, type

A

cd into it and type meteor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

meteor: To create a new app, type

A

meteor create my_app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

meteor: To render code into your html, type

A

{{myVar}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

meteor: To create a for loop in a template, type

A

{{#each items}}
{{> item}}
{{/each}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

meteor: To run code only on client, type it into

A

if (Meteor.isClient) {

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

meteor: meteor parses your template to find

A

head, body and template

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

meteor: templates can be rendered in HTML by typing

A

{{> templateName}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

meteor: To create an if statement in a template, type

A

{{#if}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

meteor: To pass data into templates from your JavaScript code, type

A
if (Meteor.isClient) {
  Template.body.helpers({
    myCollection: [
      { field: "String" },
      { field: "String" },
    ]
  });
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

meteor: To create a template, type

A

-template name=”templateName”>

-/template>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

meteor: To create a database collection, type

A

MyCollection = new Mongo.Collection(“my-collection”);

note: remember new

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

meteor: To pass data into a template from a database query as a helper, type

A
Template.body.helpers({
  getCollection: function () {
    return MyCollection.find({});
  }
})
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

meteor: Items inside collections are called

A

documents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

meteor: To access the mongo console from the terminal, type

A

meteor mongo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

meteor: To insert a document into a collection inside the mongo console, type

A

db.collectionName.insert({ field1: “string”, createdAt: new Date });

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

meteor: To listen to and handle an event in a template, type

A

Template.templateName.events({
“click .css-class”: function(event, template_instance)} {
event.preventDefault();
})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

meteor: To access the value of an input field from a form submit event, type

A

event.target.fieldName.value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

meteor: To clear the value of an input field from a form submit event, type

A

event.target.fieldName.value = “”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

meteor: To sort the data going into a template, type

A

MyCollection.find({}, {sort: {field1: -1}});

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

meteor: In a collection, every inserted document has a unique

A

_id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

meteor: To access the _id of the event currently being handled, type

A

this._id

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

meteor: The update function on a collection takes

A

two arguments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

meteor: To update a field of a document, type

A

MyCollection.update({field1: “value”}, {
$set: {field: “value”}
});

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

meteor: To delete a document, type

A

“click .css-class”: function () {
MyCollection.remove(this._id);
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

meteor: To build and run your app for ios, type

A

meteor add-platform ios

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

meteor: To run your app in ios simulator, type

A

meteor run ios

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

meteor: To run and run your app in ios simulator, type

A

meteor run android

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

meteor: To build and run your app for ios, type

A

meteor add-platform android

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

meteor: To run your app on an ios device, type

A

meteor run ios-device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

meteor: To run your app on an ios device while connected to a previously deployed server, type

A

meteor run ios-device –mobile-server my_app.meteor.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

meteor: to store temporary reactive state on the client use a

A

Session

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

meteor: Some listenable events are

A

change, click, submit, keypress, input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

meteor: To pass is a var that in a count of all of the documents in a collection, type

A

documentCount: function () {
return MyCollection.find({}).count();
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

meteor: To enable user accounts and login ui, type

A

meteor add accounts-ui accounts-password

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

meteor: To access the id of a logged in user in app.js, type

A

Meteor.userId()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

meteor: To access the username of a logged in user, type

A

Meteor.user().username

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

meteor: To display something in the view only if a user is logged in, type

A

{{#if currentUser}}

{{/if}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

meteor: To revoke client side permission to edit mongo, type

A

meteor remove insecure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

meteor: To create a method for securely editting mongo, type

A
Meteor.methods({
  insertMethod: function (text) {
    if (! Meteor.userId()) {
      throw new Meteor.Error("not-authorized");
    }
    MyCollection.insert({
      field: text,
      createdAt: new Date(),
      owner: Meteor.userId(),
      username: Meteor.user().username
    });
  },
  deleteMethod: function (Id) {
    MyCollection.remove(Id);
  },
  setMethod: function (Id, set) {
    MyCollection.update(Id, { $set: { field1: set} });
  }
});
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

meteor: adding properties and methods to Template.body.helpers({}) seems to

A

pass the body that data across all templates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

meteor: To set the value of a variable that is currently available in just the client and not the server, type

A

Session.set(‘varName’, ‘value’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

meteor: To return the value of a session variable, type

A

Session.get(‘varName’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

meteor: To set a default value for a session variable, type

A

Session.setDefault(‘varName’, ‘value’);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

meteor: To add url routing, type into terminal

A

meteor add iron:router

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

meteor: the “items” in {{#each items}} is

A

the name of a function that returns an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

meteor: To render something from an {{#each items}} block if the function returns empty, type

A

{{#each items}}

{{else}}

{{/each}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

meteor: You can place functions that are callable from a template, and that return query data in

A

Template.templateName.helpers({})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

meteor: CollectionName.find({}) returns a

A

cursor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

meteor: Making the data available to the template using a cursor makes the ui

A

reactive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

meteor: To create a mongo collection that is only on the browser you must

A

instantiate the mongo collection inside if (Meteor.isClient) {}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

meteor: To search for atmosphere packages in the terminal type

A

meteor search package_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

meteor: To add a package, type

A

meteor add author:package_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

meteor: To see the installed packages, type

A

meteor list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

meteor: To pass a {{var}} in a template as a param to a helper function, type

A

{{functionName item}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

meteor: A data context is

A

the data being passed into a part of the view

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

meteor: The data context can be accessed from javascript using

A

this.field_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

meteor: Packages that you install

A

do not need to be imported anywhere, they become available everywhere

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

websockets uses

A

DDP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

DDP stands for

A

Distributed Data Protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

meteor: To subscribe to a collection, type

A

Meteor.subscribe(“subscriptionName”)

note: Must match the name defined in publish function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

meteor: To query the database after autopublish is removed, you must

A

Publish that data using a cursor in if (Meter.isServer) {} and subscribe to that data in if (Meter.isClient) {}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

meteor: To create a cursor that publishes data from the server without autopublish, type

A

Meteor.publish(“subscriptionName”, function() {
return CollectionName.find({});
})

note: The subscriptionName can be anything, but the subscription function has to use the same name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

meteor: To unsubscribe from a collection connection, type

A

subscriptionName.stop()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

mongo: To list all your collections from the mongo shell, type

A

show collections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

mongo: To return all the documents of a collection in a pretty way, type

A

db.collectionName.find().pretty()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

mongo: To insert a new document into a collection from within the mongo shell, type

A

db.collectionName.insert({field1: “value”, field2: “value”})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

meteor: To clear a form, type

A
var form = template_instance.find("form")
form.reset();
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

meteor: The messages the server sends to the client are

A

added
removed
changed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

meteor: To manually send an added message to the client, add

A

this.added(“collectionName”, “id”, {“field1”:”value”})

to the publish function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

meteor: To manually send a ready message to the client, add

A

this.ready()

to the publish function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

meteor: To give your subscribe function a callback function, type

A

Meteor.subscribe(“subscriptionFunctionName”, function(){

})

72
Q

meteor: To send node the debug environment variable then debug on the server using chrome, type

A

NODE_OPTIONS=”–debug” meteor

node-inspector

73
Q

meteor: To return an array of documents from the database, type

A

MyCollection.fetch()

74
Q

meteor: RPC stands for

A

remote procedure calls

75
Q

meteor: To call a meteor method from the client, type

A

Meteor.call(“functionName”, param1, function(err, result){

})

in isClient
note: The last param passed in must be a callback function

76
Q

meteor: To create a meteor method on the server, type

A
Meteor.methods({
  functionName: function() {
    return ...
  }
})

in isServer

77
Q

meteor: A positional argument is an argument

A

sent into the function separated by commas

78
Q

meteor: optimistic updating uses

A

a method stub

79
Q

meteor: Meteor.methods can also be run

A

on the client

80
Q

meteor: The local cache is just

A

an array of documents

81
Q

meteor: To see everything in the local cache, type

A

into the chrome console

MyCollection._collection

82
Q

meteor: To render a button that comes for free in github’s oauth package, type

A

{{> loginButtons}}

83
Q

meteor: To return one document from a collection based on a field, type

A

MyCollection.findOne({field1: {
$in: [“value”]
})

84
Q

meteor: To only publish to logged in users, type

A

if (this.userId)
return CollectionName.find()
else
return this.ready()

85
Q

meteor: To control the permissions for users using mutator functions on the server, type

A
CollectionName.allow({
  insert: function(userId, doc) {
    return !!userId
  },
  update: function(userId, doc) {
    return false
  },
  remove: function(userId, doc) {
    return false
  } 
})
86
Q

mongo: Every time mongo mutates a collection it also

A

logs the change in a collection called opLog

87
Q

meteor: When you make a request to meteor it returns

A

script tags in the head tag and an empty body tag

88
Q

meteor: To create the templates, meteor in the background

A

uses createElement and appendChild to add stuff to the body

89
Q

meteor: Spiderable works by

A

creating a virtual machine that renders the page on the server before serving to google bot

90
Q

meteor: To add spiderable, type

A

meteor add spiderable

note: spiderable depends on phantomJS

91
Q

meteor: The lookup chain is

A

the sequence of places meteor searches to find the property or method you are calling

92
Q

meteor: To enter an object (returned from a helper) in a template and render a property of it, type

A

{{#with myObject}}
{{objectProperty}}
{{/with}}

or

{{myObject.objectProperty}}

93
Q

meteor: To make a variable’s value reactive it must

A

be getting called by Session because the function it is in is what makes it reactive

94
Q

meteor: it is a best practise that your helpers always

A

call functions so the are evaluated at call time and not page load

95
Q

meteor: To put the client side code in its own file,

A

create a folder called “client” and put a js file in it

96
Q

meteor: Putting the client side code in its own file allows you to

A

omit if (Meteor.isClient) {}

97
Q

meteor: To make reactive functions rerun, meteor uses

A

computations

98
Q

meteor: computations are

A

objects that hold the function you keep rerunning as well as some state about the function

99
Q

meteor: computations rerun the function inside them by calling the method called

A

invalidate

100
Q

meteor: The things that should go in the “public” folder are

A

images, favicons, and robots.txt

101
Q

meteor: Files in the “private” folder

A

are only accessible to methods from the server

102
Q

meteor: To put the server side code in its own file,

A

create a folder called “server” and put a js file in it

103
Q

meteor: Files stored in a “lib” folder

A

are loaded before other files and are available to both client and server. Create the collections here.

104
Q

javascript: To create a for loop, type

A

for (i = 0; i - array.length; i++) {
array[i]
}

105
Q

meteor: To create a ReactiveVar on the client, type

A

myReactiveVar = new ReactiveVar(“value”)

106
Q

meteor: To create a computation, type

A

computationName = Tracker.autorun(function() {

})

107
Q

meteor: To set a default layout for all the routes type

A

outside of client and server

Router.configure({
layoutTemplate: “templateName”
})

108
Q

meteor: To render a certain template when your navigate to a certain route, type

A

outside of client and server

Router.route(“/”, function(){
this.render(“templateName”)
})

109
Q

meteor: To accept a variable into a route, type

A

Router.route(“/folder/:varName”, function(){

})

110
Q

meteor: To return a variable that is passed into a route, type

A
Router.route("/folder/:varName", function(){
  var varName = this.params.varName
})
111
Q

meteor: To pass a session variable into a route, type

A

Router.route(“/folder/:varName”, function(){
Session.set(“varName”, “value”)
this.render(“templateName”)
})

112
Q

meteor: To pass in data based on the route, type

A
Router.route("/folder/:varName", function(){
  this.render("templateName", {
    data: function() {
      return {key: "value"}
    }
})
113
Q

meteor: To insert content from a child template into a parent template, type

A

{{> yield “contentForName”}} in the parent

{{#contentFor “contentForName”}}string{{/contentFor}}

114
Q

meteor: Files from within the client, lib, or server folders are

A

loaded in alphabetical order

115
Q

meteor: Files from within the client, lib, or server folders are

A

loaded in alphabetical order

116
Q

meteor: Files that should go in the client folder are

A

html, css, and client side js

117
Q

meteor: The js file in the lib folder should hold

A

the collection variables

118
Q

javascript: To coerce a value into true or false, type

A

!!value

119
Q

javascript to create an event handler for attributes, type

A

‘click [attribute=value]’: func…

120
Q

meteor: To add jquery, type

A

meteor add jquery

121
Q

meteor: To return whether or not a Session variable is equal to a certain value, type

A

Session.equals(“varName”, “value”);

122
Q

meteor: To add bootstrap, type

A

meteor add twbs:bootstrap

123
Q

meteor: To update the database after a key is typed into a text box, use the event called

A

input

124
Q

meteor: When using CollectionName.update use

A

the id of an object as the first argument

125
Q

meteor: To turn the elements that you created an event from into a jquery object, type

A

$(event.target)

126
Q

meteor: To add the google oauth package, type

A

meteor add accounts-google

127
Q

google: To get a key and secret from googles dev console

A

search for API Manager in search bar and click Credentials on the left.

128
Q

meteor: To do an if statement on a users profile data before publishing data, type

A
if (this.userId) {
  var user = Meteor.users.findOne(this.userId)
    if (user == ...) {
      return CollectionName.find()
    }
} else {
      return this.ready()
}
129
Q

javascript: To handle a click event if it happens anywhere on the page excluding one place

A

create an if statement that checks the event.target and if it is the element you want to exclude return false

130
Q

meteor: To add great fonts from a cdn, add the package

A

meteor add natestrauser:font-awesome

131
Q

meteor: To use oauth, you must have added

A

the package accounts-ui, not accounts-pasword

132
Q

meteor: To return the name of the currently logged in user in the template, type

A

{{currentUser.profile.name}}

133
Q

meteor: Using {{currentUser}} in a template returns

A

Meteor.user()

134
Q

meteor: To create a cursor that points to the users collection, type

A

Meteor.users.find()

135
Q

meteor: To create a cursor that sorts the collection objects, type

A

CollectionName.find({}, { sort: {field1: -1} })

136
Q

meteor: To publish only certain fields from a collection, type

A

CollectionName.find({}, { fields: {fieldName: 1, fieldName: 0} })

137
Q

meteor: To run a function that alters the users profile immediately after the create it, type

A

Accounts.onCreateUser(function(options, user) {

})

138
Q

meteor: When you create an event handler, always make sure

A

the event is occurring within the template you are putting the event handler in

139
Q

meteor: For the app to remember what the data context should be, instead of using a route, you can

A

set all the links to set a Session var which stores the name of the relevant data context.

140
Q

meteor: When creating a chat, before submitting the message you should

A

check if the message is empty by typing
if (messageVar.trim() == “”) {
return
}

141
Q

meteor: To handle an event on the whole page, type

A

“click”: function(event, templateInstance) {

}

142
Q

meteor: To return all documents where field1 matches exactly, type

A

CollectionName.find({field1: { $eq: “value” } })

143
Q

javascript: to write an inline if statement, type

A

2 > 1 ? “returnIfTrue” : “returnIfFalse”

144
Q

meteor: To create a dependency, type

A

var depName = Tracker.Dependency

145
Q

meteor: A dependency is

A

an object that holds a list of your computations, and has a .changed() function that invalidates all your computations

146
Q

meteor: To make a computation that depends on a dependency called dep, type

A

Tracker.autorun(function() {
dep.depend()

})

147
Q

meteor: The attribute that makes a data source a reactive data source is that

A

it calls dep.changed() so that all of the dependent computations rerun.

148
Q

meteor: Session.get(“value”) is an example of a

A

reactive data source

149
Q

meteor: To create a computation that depends on a Session.get(), type

A

Tracker.autorun(function() {
Session.get(“value”)

})

150
Q

meteor: To run a function directly after a CollectionName.insert type

A

CollectionName.insert({field1: ‘value’}, function(){

});

151
Q

meteor: To call a function every time you receive an added DDP message, type

A
CollectionName.find({}).observe({
  added: function(id, doc){
    console.log("string") 
  }
})
152
Q

meteor: To create a computations that depends on changes to a collection, type

A
Tracker.autorun(function() {
  CollectionName.find().fetch()
  ...
})
note: You must do something/anything to the cursor for it to call .changed()
153
Q

javascript: To evaluate an object key name

A

surround it with [key]

154
Q

meteor: To create a new objectId based on an _id string, type

A

var objectIdInstance = new Meteor.Collection.ObjectID(“string”);

CollectionName.findOne(objectIdInstance);

155
Q

meteor: To update a document attribute without removing any other data, you must use

A

{ $set: {attributeName: “value”} }

156
Q

meteor: CollectionName.insert({}) automatically returns

A

the _id string

157
Q

meteor: Mongo and Meteor insert new document ids

A

differently. Meteor uses strings, Mongo uses ObjectIDs

158
Q

iTerm2 does not

A

paste a string with a trailing space

159
Q

html: Numbers in html attributes must

A

go in quotes

160
Q

learn to understand, why use sessionvar instead of var, which order a sort 1 and -1 goes,

A

d

161
Q

meteor: To run app on iphone, type

A

meteor run ios-device

162
Q

meteor: If you are not seeing the changes made in your code reflected in your iphone app

A

you should delete the app from the iphone and try to run it again

163
Q

meteor: To allow mobile device to rotate with your app, type

A

window.shouldRotateToOrientation = function(degrees) {
return true;
}

into client code

164
Q

meteor: To make a mobile phone vibrate when a collection recieve an added message, type

A

meteor add cordova:org.apache.cordova.vibration@0.3.10

if (Meteor.isCordova) {
  CollectionName.find({}).observe({
    added: function (doc) {
      navigator.notification.vibrate(90000)
    }
  })
}
165
Q

meteor: To create a route with flowrouter, type

A
FlowRouter.route('/:param1/param2', {
  action: function() {
    BlazeLayout.render("mainLayout", {content: "templateName"});
  }
});
166
Q

meteor: To render the template name that is passed in as the “content” variable by flowrouter, type

A

-template name=”mainLayout”>
{{>Template.dynamic template=content}}
-/template>

167
Q

meteor: To create the route, data context, template and template level subscription in flow router, type

A

meteor add kadira:blaze-layout
meteor add kadira:flow-router

FlowRouter.route('/:param1/param2', {
  action: function() {
    BlazeLayout.render("mainLayout", {content: "templateName"});
  }
});
Template.templateName.onCreated(function() {
  var self = this;
  self.autorun(function() {
    var param1 = FlowRouter.getParam('param1');
    self.subscribe('subscriptionFunctionName', param1);  
  });
});
Template.templateName.helpers({
  record: function() {
    return CollectionName.findOne({_id: FlowRouter.getParam('param1') })
  }
});
  {{#if Template.subscriptionsReady}}
    {{#with record}}
      {{content}}
    {{/with}}
  {{else}}
    Loading
  {{/if}}
168
Q

meteor: To add a use images in mobile apps

A

create a “public” folder and place the images there

write the paths to the images as if you are in the public directory

169
Q

meteor: To set the icon and splash page you must

A

set them in mobile-config.js

http://stackoverflow.com/questions/26957503/meteor-way-to-specify-icon-and-launch-screen-of-an-app

170
Q

meteor: For multi touch events, use

A

chriswessels:hammer

171
Q

meteor: To deploy meteor to heroku, type

A

git commit -am “string”
heroku create –buildpack https://github.com/jordansissel/heroku-buildpack-meteor.git
heroku addons:create mongolab
open mongolab page and add a user/password in the user tab, then insert it into the provided mongo URI above
heroku config:add MONGO_URL=MONGOLAB_URI_from_heroku_page
heroku config:add ROOT_URL=https://your-app-name.herokuapp.com
heroku labs:enable http-session-affinity
git push heroku master

172
Q

meteor: The folder structure of my meteor app should be

A

client | layout.html, project.css, name.js, views | view1.html, view2.html
server | name.js
lib | router.js, models.js (collection creation and schema)(any common code for client/server)
public | images, favicons, robots.txt

173
Q

meteor: For prototyping it is fine to use {{> loginButtons}} but later you should

A

build your own UI and call functions like Accounts.loginWithPassword, Accounts.loginWithFacebook, Accounts.createUser and Accounts.forgotPassword directly

174
Q

meteor: Flowrouters routes must go

A

in the lib folder

175
Q

meteor: To use regular npm packages in metoer

A

meteor add meteorhacks:npm
meteor (this create packages.json)
add “packageName”: “1.0.0” to packages.json in root
use Meteor.npmRequire(“packageName”) when requiring in server methods

176
Q

metoer: if you see ERROR whitelist rejection: error

A

add App.accessRule(‘*’); to mobile-config.js since it by default blocks remote hosts