Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering MeteorJS Application Development

You're reading from   Mastering MeteorJS Application Development MeteorJS makes full-stack JavaScript Application Development simple – Learn how to build better modern web apps with MeteorJS, and become an expert in the innovative JavaScript framework

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785282379
Length 298 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jebin BV Jebin BV
Author Profile Icon Jebin BV
Jebin BV
Arturas Lebedevas Arturas Lebedevas
Author Profile Icon Arturas Lebedevas
Arturas Lebedevas
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Building a MeteorJS Web Application FREE CHAPTER 2. Developing and Testing an Advanced Application 3. Developing Reusable Packages 4. Integrating Your Favorite Frameworks 5. Captivating Your Users with Animation 6. Reactive Systems and REST-Based Systems 7. Deploying and Scaling MeteorJS Applications 8. Mobile Application Development 9. Best Practices, Patterns, and SEO Index

The server-side setup – FoodMenu

Firstly, we will complete server-side development quickly and precisely. Then, we will concentrate on the Angular.js part.

Collection

Inside the lib directory, add the collections.js file. Here, we will put our collection that will be shared across the application. It is better to use the Collection2 package to define a schema and validation. However, to demonstrate, we will assume the schema and develop things. Add the following piece of code to collections.js:

/** name, chef_name, contents, time, image, quantity,
  prize, is_published, is_deleted, created_at, updated_at
*/
FoodMenu = new Mongo.Collection("foodMenu");

The fields in the collection are given in the preceding code comment. We have defined the collection and created an instance as well.

Publish

We will publish the collection. However, before publishing, we need to remove the autopublish and insecure packages. After removing them, add publish.js to the server directory.

Add the following...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image