Skip to content
This repository was archived by the owner on Jan 27, 2018. It is now read-only.

Development Notes

Alex Grant edited this page Aug 2, 2015 · 16 revisions

Development Notes

This page contains notes as a developer I'm collecting as I go.

Config Notes

Cloudinary

To make use of Cloudinary, you have to place the images there yourself (there is no task for this). However, that's pretty easy for small numbers of images.
On the cloud host (Heroku in this example), make sure to set IMAGE_SERVICE_URL to 'http://res.cloudinary.com' and CLOUD_NAME to the name of your cloud on Cloudinary. The background images named in the routes in FRED will be pulled off your cloud and sized automatically as required.

Code Analysis

Codacy

Trying out the Codacy service.

Codacy Badge

To get an additional opinion on the static analysis, I ran Plato against the project. I'm new to Codacy, so this was an step that connected my past tools with the new, and helps me evaluate Codacy.

Plato

I'm opting for using global plato, npm install -g plato, to keep development tools running on git hooks, cloud based, and out of the project source as much as possible. Referring to plato analysis is just putting a past perspective forward on the state of the source for me. Here is the main command I used to generate the report (run from the project root directory):

plato -r -d reports/plato -l .jshintrc -t "Flux-React-Example" -x 'node_modules\/*|dist\/*|assets\/*|reports\/*|tmp\/*|Gruntfile.js' ./**

Contact Service

When the flux-react-example creates a contact, it calls the Contact Service. On the server, the Contact Service inserts a new contact into an AMQP compliant queue, which is picked up by a queue consumer worker process. When a new contact is inserted into the queue, the queue consumer worker is notified and it sends the mail using a well-known mail service.

The flux-react-example Contact Service relies on node packages:

  1. amqplib
  2. nodemailer

These are configured for flux-react-example in configs/contact.

Results

In development mode, flux-react-example defaults to post outgoing mail to a local AMQP broker. If one does not exist, in the browser you should get a 400 response from the POST that creates a new contact. If one does exist, the new contact is added to the queue. You can run the contact worker process to send the queued mail message to a well-known mail service.

Queue

Here is what I did to setup the AMQP queue on my development machine:

  1. Debian Install
  2. Enable Management

Clone this wiki locally