We're excited to have you attend one of our workshops! Here's a JavaScript (re)fresher to help you get up-to-speed on some features of the language we'll be using.
JavaScript has always had var:
var name = 'Ryan'| const fetch = require('node-fetch') | |
| const Bacon = require('baconjs') | |
| function getInPortuguese(word) { | |
| // Google Translate API is a paid (but dirt cheap) service. This is my key | |
| // and will be disabled by the time the video is out. To generate your own, | |
| // go here: https://cloud.google.com/translate/v2/getting_started | |
| const apiKey = | |
| 'AIzaSyB4DyRHIsNhogQXmH16YKbZfR-lTXrQpq0' | |
| const url = |
| /*global ig*/ | |
| ig.module( | |
| 'plugins.persistence.localstorage' | |
| ).requires( | |
| 'impact.game' | |
| ).defines(function () { | |
| 'use strict'; | |
| ig.PersistenceLocalStorage = ig.Class.extend({ | |
| /** | |
| * Initialize Persistence as localStorage |
| # Add this config | |
| $ heroku config:add LD_LIBRARY_PATH=/app/php/ext:/app/apache/lib | |
| # Login to Heroku CLI | |
| $ heroku run bash | |
| # The second argument here is the path to your script | |
| ~ $ ~/php/bin/php -f ~/www/index.php |