GithubHelp home page GithubHelp logo

guilhermedecampo / goto-meteor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olizilla/goto-meteor

0.0 2.0 0.0 2.17 MB

A Meteor based, collections-centric experiment in geolocation and watching people arrive.

goto-meteor's Introduction

goto.meteor.com

GOTO: A Meteor based, collections-centric experiment in geolocation and watching people arrive.

For the Meteor London gang...

GOTO Screenshot

http://goto.meteor.com

Meteor.settings.public.center = "{"lat":51.50532341149335,"lng":-0.186767578125,"zoom":10}"

Meteor for the impatient

You can dump css files into the project and they automagically appear in the head in the rendered html. They are added in alphabetical order, and files in subdirectories are added before files in in the root. The deeper in the tree the earlier it loads. So for example we could be super-louche and create a libs dir for all third party css & js... I dumped normalise.js in there and boom. it's loaded.

Put CSS & JS resources for the client in a dir called client. If you don't then your js libs will be processed on the server where there is no window object and cause an error. If you do, then all your libs and css will be automagically included in the head of your rendered html. The resrouces are automagically served with version info and cache headers for you dont have to think.

Deploying to meteor.com

meteor deploy [sitename] --password

Will prompt you to choose a password, bundle up your app and deploy it to sitename.meteor.com

The hosting is currently a freebee, and while they work out a fulll auth system, it's just password protected at the moment. If you leave off the --password then anyone can overwrite your app. If you just want a quick throw away test then that might be what you want.

meteor deploy [sitename] --password --settings [settings.json]

Will create a Meteor.settings property that allows you to pass secrets and config to your app at deploy time. If you add a public property to that json object, then the properties for the public object will be available on the client too.

{
	"public":{
		"center":{
			"lat":51.50532341149335,
			"lng":-0.186767578125,
			"zoom":10
		}
	}
}

Gotchas that got me

  • Template methods used in the template, like grabbing the src for a gravatar url based on the current user, are called before
  • Collections take some time to get populated. Add an explicit subscribe onComplete handler to only run code once the Collection is ready.
  • Empty objects are removed from Collections. myCollection.insert({}) will insert succedfully and return an _id, but the object will immedietly be removed:meteor/meteor#308
  • Players.remove({position: undefined}); removed everyone while Players.find({position: undefined}).fetch(); pulled the list of records that had no position. SUPRISE! I DELETE ALL URE DATAZ... Thanks mongo.

goto-meteor's People

Contributors

alanshaw avatar olizilla avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.