Provide information from Meteor onto a separate static site


#1

I have two websites. My meteor application, and my static information site.

The static site uses plain HTML, JS, and jQuery, without Meteor.

Basically, I want to display the length of a collection (the number of items) from my Meteor app on my static website.

What would be the easiest way to acomplish this?


#2

https://github.com/mondora/asteroid is working pretty well.

edit: or https://github.com/mondora/ddp.js/ which is lower level but lighter.


#3

Not sure what you are looking for, but it seems to me, that your current static site is just delivered from server to browser. So no scripting or background processing. That would make it a little more complicate to get values from meteor for you.

You may add DDP to your static client and script connection etc. but why not do it the easy way.

Just deliver your static web site from meteor. You will just create one template around your current page. Then you can use for example all the blaze options to access all meteor vars.

My suggestion to you.


#4

Sorry,

To clarify. I have two websites:

  • A meteor application
  • A static site, using python SimpleHTTPServer

I want to deliver a number from the meteor application, to the static (SimpleHTTPServer) site.

I am aware you can use a meteor call to get the value to a client page, and jQuery to change the value on the static site, but how do I get the number from the application to the static site.


#5

@therealnate try this:

https://atmospherejs.com/simple/rest

Then you can call a method on your Meteor app server using jQuery, and display the result.