Nyxynyx
Nyxynyx

Reputation: 63657

Add a static frontpage to Meteor.js

I've started learning Meteor.js and it seems fabulous for single page app. But I only know how to create one page for the entire site.

How can I add a static page to http://domain.com and have my Meteor app run at http://domain.com/app? For your solution, will your page actually change when you go to domain.com/app from domain.com?

Upvotes: 3

Views: 1142

Answers (2)

Mike Graf
Mike Graf

Reputation: 5317

If you dont mind calling a html file you can have static pages in /public. This probably wont work for you, because your page probably isnt actually a "static" page. This would be accessed at http://mydomain.com/index.html .

eg, /public/index.html :

<html>
    <head>
        <link href="/public/index.css rel="stylesheet">
    </head>
    <body>
        <h1 class="something"> I am a web page </h1>
    </body>
</html>

Upvotes: 1

ram1
ram1

Reputation: 6470

Check out meteor-router. It lets you assign routes to templates.

Upvotes: 1

Related Questions