How To Add A Landing Page To Meteor App?

This may not be the place to ask, but I tried stackoverflow, read other posts here, and still can’t add a landing page to my app. Problem is, when I delete <body> {{> wall}} </body>, I have a landing page, but it leads to a non-functioning app. If I keep <body> {{> wall} </body>, the landing page renders under the app. How can I fix? If not proper to ask here, I’m very sorry. Thank you.

landing.html:

<template name="home">
...
</template>

drawingApp.html:

<body>
  {{> wall}}
</body>
<template name="wall">
...
{{> canvas}}
</template>
<template name="canvas">
...
</template>

routes.js:

Router.route('/', function () {
  this.render('Home');
});
Router.route('wall', function () {
  this.render('Wall');
});

drawing.js:

...
Template.wall.events({
...

Make sure Your route is /wall and Not wall

Also see https://github.com/QHose/QRSMeteor/blob/master/imports/ui/layout.html

Thanks hoser23331. I will change that route typo and study the link.

landing page:

// //map paths to blaze templates
Router.route('/', function() {
    this.render('introduction');
});

This is my router:

//Layout Configuration. http://stackoverflow.com/questions/28864942/meteor-use-2-different-layouts-ironrouter
Router.configure({
    layoutTemplate: 'layout',
    notFoundTemplate: 'notFound',
});


//make sure certain path are for authenticated users only
Router.plugin('ensureSignedIn', {
    only: ['generation', 'users', 'SSO', 'useCaseSelection']
});


// //map paths to blaze templates
Router.route('/', function() {
    this.render('introduction');
});

Router.route('/users');
Router.route('/homeAbout');
Router.route('/APILogs');
Router.route('/ApiLogsTable');
Router.route('/introduction');
Router.route('/videoOverview');
Router.route('/introductionExtended');
Router.route('/introductionSecurity');
Router.route('/SecurityDeepDive');
Router.route('/generation');
Router.route('/securityRules');
Router.route('/QMC');
Router.route('/webIntegration');
Router.route('/architecture');
Router.route('/sequenceDiagramOverview');
Router.route('/sequenceDiagramGeneration');
Router.route('/legal');
Router.route('/documentation');
Router.route('/templateOverview');
// Router.route('/useCaseSelection');

//Single sing on integration route, this is the route you configure in Qlik sense proxy
Router.route('/SSO', {
    template: 'SSO',
    layoutTemplate: 'SSOLayout'
});

// Router.route('/', function() {
//     this.render('', { to: 'nav' });
//     this.layout('regionLayout');
//     this.render('useCaseSelection');
// });

Router.route('/useCaseSelection', function() {
    this.layout('oneColumnCenteredLayout');
    this.render('useCaseSelection');
});


Router.route('/selfService', function() {
    this.layout('regionLayout');
    this.render('SSBINav', { to: 'nav' });
    this.render('SSBIUsers', { to: 'aside' });
    this.render('SSBISenseApp');
});





// Router.route('/register');
// Router.route('/login');

You should consider splitting your marketing site and your application (unless your application is the site of course, like a forum, or needs to pull lots of data from the app.)

Can you handle 2k uniques or more on your landing page at single time? Won’t that cause your Meteor server time to go to those uniques instead of your customers? What if you get a traffic spike because of you get on Producthunt?
Then your app crashes for your customers or you have to do some expensive scaling.

So host your marketing site, do Tumblr, hosted Wordpress, Digital Ocean Wordpress or whatever.

Meteor can handle 2k uniques or more on the landing page at a single time; it’s DDP that can’t handle that many. Be sure not to have any subscriptions on your landing page. That includes global subscriptions.

(We find the best strategy for subscriptions is to make them semi-global, tied to user account login. People are accustomed to login taking awhile to complete; and prefetching data prevents lag in subsequent component loading.)

1 Like