Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hamamatsu.js #4 ES6 playground by Docker

Hamamatsu.js #4 ES6 playground by Docker

Hamamatsu.js #4の発表資料です。

jacoyutorius

August 03, 2018
Tweet

More Decks by jacoyutorius

Other Decks in Programming

Transcript

  1. docker-compose up $ docker-compose up Creating network "hmjs4_default" with the

    default driver Creating hmjs4_webserver_1 ... done Attaching to hmjs4_webserver_1 webserver_1 | 172.22.0.1 - - [02/Aug/2018:14:01:33 +0000] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Kitematic/0.13.0 Chrome/ 45.0.2454.85 Electron/0.35.4 Safari/537.36" "-" webserver_1 | 172.22.0.1 - - [02/Aug/2018:14:01:34 +0000] "GET / HTTP/1.1" 200 612 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/ 537.36" "-" webserver_1 | 2018/08/02 14:01:35 [error] 8#8: *2 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 172.22.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost: 5500", referrer: "http://localhost:5500/" webserver_1 | 172.22.0.1 - - [02/Aug/2018:14:01:35 +0000] "GET /favicon.ico HTTP/1.1" 404 571 "http:// localhost:5500/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36" "-"
  2. docker-compose up version: "3" services: webserver: build: context: "./" image:

    nginx volumes: - “./html:/usr/share/nginx/html” ports: - "5000:80"
  3. html/js/script.js window.onload = () => { const p = document.createElement("p")

    p.innerText = "How are you?" document.body.appendChild(p) }
  4. html/js/script.js import greet from “/js/libs/greet.js" window.onload = () => {

    const p = document.createElement("p") p.innerText = greet("yuto") document.body.appendChild(p) }
  5. tree . ᵓᴷᴷ Dockerfile ᵓᴷᴷ docker-compose.yml ᵋᴷᴷ html ᵓᴷᴷ index.html

    ᵋᴷᴷ js ᵓᴷᴷ libs ᴹ ᵋᴷᴷ greet.js ᵋᴷᴷ script.js