use diff to get fun red and green lines
- old
+ new| import React from "react"; | |
| export default function MainLayout(Child) { | |
| return class MainLayoutComponent extends React.Component { | |
| static getInitialProps(context) { | |
| return Child.getInitialProps(context); | |
| } | |
| render() { |
| import λ from "apex.js"; | |
| import { Pool } from "pg"; | |
| // connection details inherited from environment | |
| const pool = new Pool({ | |
| max: 1, | |
| min: 0, | |
| idleTimeoutMillis: 120000, | |
| connectionTimeoutMillis: 10000 | |
| }); |
| const Sequelize = require("sequelize"); | |
| const sequelize = new Sequelize( | |
| process.env.DB_NAME, | |
| process.env.DB_USER, | |
| process.env.DB_PASS, | |
| { | |
| host: process.env.DB_HOST, | |
| dialect: "mysql" | |
| } |
| var first = true; | |
| module.exports = function () { | |
| console.log(`first: ${first}`); | |
| if (first) { | |
| first = false; | |
| } | |
| }; |
use diff to get fun red and green lines
- old
+ newI hereby claim:
To claim this, I am signing this object:
| { | |
| "extends": "future/react" | |
| } |
| assert = require('assert'); | |
| require('dotenv').config({path: 'production.env'}); | |
| assert.equal(process.env.DB_USER, 'root') | |
| assert.equal(process.env.PORT, 80) |
| class Animal | |
| constructor: -> | |
| @noise = "BOOM" | |
| speak: -> console.log @noise | |
| class Dog extends Animal | |
| constructor: -> | |
| @noise = "BARK" |
| function car() { | |
| return { | |
| start: function() { | |
| return "Engine on." | |
| }, | |
| accelerate: function() { | |
| return "Let's go!" | |
| } | |
| } | |
| } |