Skip to content
This repository has been archived by the owner on Nov 8, 2020. It is now read-only.

lourot/mybeir.ut

Repository files navigation

WARNING: This project isn't maintained anymore.

mybeir.ut Build Status

Interactive map of bars, clubs and restaurants in Beirut.

Fork of myberl.in.

Serve locally

$ sudo npm install -g http-server
$ http-server

Note: Front-end errors won't be sent to Sentry. See Monitoring/Alerting.

Run the E2E and unit tests

$ npm install
$ npm run-script karma

Note: Front-end errors won't be sent to Sentry. See Monitoring/Alerting.

Deploy/Update the AWS Route 53 domain

$ sudo pip install awscli
$ aws configure
AWS Access Key ID [None]: ********
AWS Secret Access Key [None]: ********
Default region name [None]: us-east-1
Default output format [None]:
$ ./aws/dns_create.sh
$ ./aws/dns_update.sh

Set up Netlify

We use Netlify to deliver the app over HTTPS. Install the Netlify CLI and authenticate with

$ sudo npm install -g netlify-cli
$ netlify sites # first authentication, creates ~/.netlify/

Create this site on Netlify:

$ netlify create -n mybeir.ut # already done, creates ./.netlify

Enable GitHub continuous deployment:

$ netlify init
? Directory to deploy (blank for current dir): 
? Your build command (middleman build/grunt build/etc): 
Configuring automated deploys for
  repo: AurelienLourot/mybeir.ut
  branch: master
  dir: .
  cmd: N/A
? Looking good? Yes
? GitHub username: AurelienLourot
? GitHub password: ********
Preparing deploy key
Adding deploy key to github repo
Configuring netlify site
Adding webhook to repository
Success! Whenever you push to Github, netlify will build and deploy your site
  http://mybeir-ut.netlify.com

Set the domain name:

$ netlify update -d beirut.myberl.in
Site updated:
  http://beirut.myberl.in

Monitoring/Alerting

Any front-end error is sent to Sentry (except when served on *localhost*). This can be leveraged by loading the webapp regularly from the console or a cronjob:

$ sudo apt-get install phantomjs
$ npm run-script loadsite

In addition to sending any error to Sentry, npm will terminate with a non-null exit value if:

  • the app's initialization times out, or
  • beirut.myberl.in is unreachable.

Documentation