Meteor

From air
Revision as of 16:01, 25 July 2016 by Donsez (talk | contribs) (→‎Docker)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://www.meteor.com/

Web (server and client) framework.

Includes :

Remark: Meteor only supports i686 and x86_64 for now but ...

Extra:

Quickstart

Doc is here https://docs.meteor.com/#/basic/quickstart

Install Meteor:

curl https://install.meteor.com | /bin/sh

Create and run a new project:

meteor create myapp
cd myapp

Add packages (listed on http://www.atmospherejs.com/)

meteor add coffeescript
meteor add spinner
meteor add accounts-ui accounts-facebook accounts-google accounts-github accounts-twitter


meteor add meteor-platform
meteor add mrt:paypal
meteor add mrt:loading

meteor list 

meteor search paypal
meteor show mrt:paypal

meteor list 

meteor remove accounts-github

meteor list


Launch the app in Meteor

meteor

Browse http://localhost:3000/

Deployment sur le cloud Meteor

meteor deploy myapp.meteor.com

Meteor on Raspberry Pi

http://www.ianbuildsapps.com/running-meteor-js-on-raspbian-on-the-raspberry-pi/

Production Deployment

With MUP (Meteor Up)

Meteor Up (mup for short) is a command line tool that allows you to deploy any Meteor app to your own server.

Install mup

npm install -g mup

Create a package

Use NPM modules

Ajouter le package meteorhacks:npm

meteor add meteorhacks:npm


Créer un nouveau fichier ./package.json avec le contenu (la version doit être exacte : pas d’expression npm du type ^ >= ..)

{ "serialport": "2.0.2" }

Installer le module

npm install serialport


Ajouter à server/app.js la ligne suivante

var SerialPort = Meteor.npmRequire('serialport');

Performance Monitoring

meteor-ddp-analyzer

meteor-ddp-analyzer trace les échanges Distributed Data Protocol entre le serveur et le browser web.

Dans un terminal, installer et lancer le proxy DDP

sudo npm install -g ddp-analyzer
ddp-analyzer-proxy

Dans un terminal, lancer le serveur Meteor

export DDP_DEFAULT_CONNECTION_URL=http://localhost:3030
meteor run

Naviguer sur http://localhost:3000

Kadira

File:KadiraDashboard001.png
Kadira dashboard monitoring

Kadira is a performance monitoring for Meteor.

https://kadira.io/#features

Installation

Créez un compte gratuit via votre id Meteor.

meteor add meteorhacks:kadira
export KADIRA_APP_ID=YOUR_ID 
export KADIRA_APP_SECRET=YOUR_APP_SECRET

Load and Stress Testing

https://bulletproofmeteor.com/architecture/load-and-stress-testing


Docker

https://bulletproofmeteor.com/architecture/docker-and-meteor

CloudFoundry

https://github.com/cloudfoundry-community/cf-meteor-buildpack

Clustering

https://github.com/meteorhacks/cluster

Books

Meteor @ AIR