Skip to content

jplusplus/rentswatch-app

Repository files navigation

RentsWatch

This app requires a system with node (tested with 5.7.1), npm (tested with 3.5.2) and grunt-cli (tested wwith 0.1.13).

Software dependencies

To generate charts we need to install a few packages:

sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++

Form other systems than Ubuntu see: https://www.npmjs.com/package/canvas#installation

Quick install

From the root directory

make install

Configure

Create a configuration file using the template:

cp server/config/local.env.sample.js  server/config/local.env.js

Then change values to add the DATABASE_URL and the RENTSWATCH_API_TOKEN:

module.exports = {
  DOMAIN: 'http://localhost:9000',
  SESSION_SECRET: "rentswatchapp-secret",
  DATABASE_URL: 'mysql://...',
  RENTSWATCH_API_TOKEN: '...'
};

Serve files

Still from the root directory

make run

Deploy

To deploy the app on Heroku, you must have Docker and Docker Compose installed on your machine.

To verify that you have a working Docker installation, open a shell and run:

$ docker ps
CONTAINER ID        IMAGE               COMMAND ...
$ docker-compose --version
docker-compose version 1.5.2, build 7240ff3

You may now install the Heroku Toolbet as follow:

wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh

And the Docker plugin for the toolbelt:

heroku plugins:install heroku-docker

You may now be able to deploy the app using this command:

make deploy

Commands

This application comes with a few commands to run in your terminal.

Command Description
make install ...
make run ...
make prefetch ...
make deploy ...
make artillery ...

Translation credits

Huge thanks to:

  • Adrián Blanco for the Spanish version
  • Riccardo Maddalozzo for the Italian version
  • Markéta Malinová, and Douglas Arellanes for the Czech version
  • Karl Martinsson for the Swedish version

and to Pinkie for her help!

Press coverage