Code Monkey home page Code Monkey logo

microscope's Introduction

Microscope

Microscope is a simple social news app that lets you share links, comment, and vote on them.

It was built with Meteor as a companion app to The Meteor Book, and is the "little brother" of Telescope, the (much more complex) open-source social news app that was the inspiration for the book.

Microscope itself is free and open-source, and is a good example of common Meteor app patterns such as:

  • Routing
  • User Accounts
  • Notifications
  • Errors
  • Publications/Subscriptions
  • Permissions

This Repository

The commits to this repository are organized in a very linear fashion, corresponding to progress throughout the book. Commits are tagged in the format chapterX-Y, indicating the Yth commit of chapter X.

Also, note that as the book focuses on development, all CSS is committed in a single commit early on.

Branches

There are 2 branches in this repository which correspond to advanced code that is covered in sidebars of the book, and outside of the main code progression. They are tagged sidebarX-Y, corresponding to the sidebar number in the book.

microscope's People

Contributors

tmeasday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microscope's Issues

Router -> iron-router

Guide uses mrt add router which gives a connection not found error. Iron router did work for me.

Chapter 7.5 page 84 : Latency Compensation problem

Hi,
In Discover Meteor there is an example about Latency compensation. I'm running Meteor 0.6.4 (but also reproduced on 0.6.3.1) and the example fail. In fact the callback passed to Meteor.call('post'...) is not called by client until the server send the response. The post is well created on client side, the methods is called both on client and on server, but the callback is just waiting for the server response.
I had to add the following code in collections/posts.js to do the client redirection instead of returning the postId :
var postId = Posts.insert(post);
/* START my hack /
if (this.isSimulation) {
Meteor.Router.to('postsList');
}
/
END my hack */
return postId;

fixtures.js needs startup function

Going through this very well written book with friend.Figured out that this needs to be wrapped in a startup function:

Meteor.startup(function() {
if (Posts.find().count() === 0) {
Posts.insert({
title: 'Introducing Telescope',
author: 'Sacha Greif',
url: 'http://sachagreif.com/introducing-telescope/'
});
Posts.insert({
title: 'Meteor',
author: 'Tom Coleman',
url: 'http://meteor.com'
});
Posts.insert({
title: 'The Meteor Book',
author: 'Tom Coleman',
url: 'http://themeteorbook.com'
});
}
});

It seems that without it, the condition is not being looked at. Now the collection gets populated if empty.

pageRender

On page 47, chapter 5 section 'Routing: mapping URLSs to templates', in your code for the file client/main.html, you write {{renderPage}} but I could only get it to work by putting {{> renderPage}}.

Of course, I'm new to this, and if i'm doing something wrong, let me know.

Building Microscope

Trying to build this. What dependencies do I need?

root@asselinpaul:~/Microscope# meteor
[[[[[ ~/Microscope ]]]]]

No dependency info in bundle. Filesystem monitoring disabled.
=> Errors prevented startup:
Exception while bundling application:
Error: The package named router does not exist.
    at _.extend.initFromPackageDir (/root/.meteor/tools/cc18dfef9e/tools/packages.js:155:13)
    at _.extend.initFromWarehouse (/root/.meteor/tools/cc18dfef9e/tools/packages.js:197:10)
    at Object._.extend.get (/root/.meteor/tools/cc18dfef9e/tools/packages.js:353:15)
    at self.api.use (/root/.meteor/tools/cc18dfef9e/tools/bundler.js:111:28)
    at Array.forEach (native)
    at Function._.each._.forEach (/root/.meteor/tools/cc18dfef9e/lib/node_modules/underscore/underscore.js:78:11)
    at Object.self.api.use (/root/.meteor/tools/cc18dfef9e/tools/bundler.js:110:9)
    at _.extend.init_from_app_dir [as on_use_handler] (/root/.meteor/tools/cc18dfef9e/tools/packages.js:238:11)
    at _.extend.use (/root/.meteor/tools/cc18dfef9e/tools/bundler.js:464:11)
    at Object.exports.bundle (/root/.meteor/tools/cc18dfef9e/tools/bundler.js:873:12)
    at /root/.meteor/tools/cc18dfef9e/tools/run.js:697:26
    at exports.inFiber (/root/.meteor/tools/cc18dfef9e/tools/fiber-helpers.js:24:12)

Please fix the problem and restart.

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.