Aus Peter Fuerholz' Wiki
Zur Navigation springen Zur Suche springen

First steps

Important modules

Look up available modules under AtmosphereJS.

React.JS for MeteorJS
Allows to use Browserify in MeteorJS (?)
Allows to install NPM modules in MeteorJS
This module is used to avoid having ReactJS included twice: Once from MeteorJs and once via npm. See here (other ReactJS in MeteorJS tutorial) and here (Contains information about the specific files app.browserify.js / app.browserify.options.json.)
HTML5 introduced form input validation. Nevertheless this specification stops where it comes to the user interface or is browser specific. At the other side bootstrap introduces visually-appalling CSS classes for showing errors or warnings. Bootrap-validator brings both sides together. The package linked here is this package brought to Meteor. Here you find help how to use Bootstrap-Validator.

Implementing tests

See here:

  • Install:
 meteor add sanjo:jasmine
 meteor add velocity:html-reporter
  • Implement your tests under the test directory tests/jasmine/:
client / integration tests
client / unit tests
server / integration tests
server / unit tests

Introduction into Jasmine. You can disable the test types above by setting following environment variables to 0: See startMeteor script within MeteorReactReduxTemplate-project. Install PhantomJS to have 'Karma'-window (2nd browser window) disappear.

Using CSS

If you use npm packages therein contained CSS files (and other artifacts) do not get imported as well. As a solution you can put them (respective create sym link) into the /client/stylesheets directory, see here and here.

Tipps and Tricks

Update to Meteor 1.4

Meteor updated with meteor update Unfortunately I got problems with my old Mongo-DB installation. Since I still use a 32 bit Ubuntu (14.04) I got some problems to bring it to run again. Here is what I've done:

  • download latest Mongo-DB from here. Unzipped it and replaced the binaries in /usr/bin. As I've found out this update is necessary only at the border due to the fact that Meteor provides its own MongoDB binaries. They are placed under /home/pfu/.meteor/packages/meteor-tool/.
  • Deleted the database with meteor reset. (You will loose all data!) Afterwards I was not able to start meteor again. To create a new database I had to call mongod --storageEngine=mmapv1 --dbpath ./.meteor/local/db. (The storageEngine 'wiredTiger' seems not to be supported on the 32 bit.)
  • Now I was able to start meteor again.

Upstart problems

  • If you cannot upstart MeteorJS due to a MongoDB locking problem delete following file: <project dir>/.meteor/local/db/meteordb.lock