My JavaScript solution to the Code100 puzzle Event Block.
This will run in Node.js. Make sure the file is in the same directory as the JSON file. Then run
node event-block.mjs
| javascript: (function () { | |
| const endpoint = new URL( | |
| "http://localhost:7860/api/v1/run/YOUR_FLOW_ID" | |
| ); | |
| const body = { | |
| input_value: globalThis.location.href, | |
| input_type: "text", | |
| }; | |
| fetch(endpoint, { |
| { | |
| "data": { | |
| "edges": [ | |
| { | |
| "animated": false, | |
| "className": "", | |
| "data": { | |
| "sourceHandle": { | |
| "dataType": "Agent", | |
| "id": "Agent-RjPJv", |
My JavaScript solution to the Code100 puzzle Event Block.
This will run in Node.js. Make sure the file is in the same directory as the JSON file. Then run
node event-block.mjs
| import "./App.css"; | |
| import Form from "./Form"; | |
| function App() { | |
| const startingData = { | |
| name: "Phil", | |
| jobs: [ | |
| { title: "Front end developer", company: "ACME Dev" }, | |
| { title: "Full stack developer", company: "Another place" }, | |
| { |
This is an example of how to send an email. To run this script you should:
npm installThis is an example of how to send an SMS. To run this script you should:
npm install| # Logs | |
| logs | |
| *.log | |
| npm-debug.log* | |
| yarn-debug.log* | |
| yarn-error.log* | |
| lerna-debug.log* | |
| # Diagnostic reports (https://nodejs.org/api/report.html) | |
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Camera selection</title> | |
| <style> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Fetch test</title> | |
| </head> | |
| <body> | |
| <main> | |
| <h1>Press this button</h1> | |
| <button id="btn">Press me</button> |
| var http = require('http'); | |
| var twilio = require('twilio'); | |
| var qs = require('querystring'); | |
| http.createServer(function (req, res) { | |
| var body = ''; | |
| req.setEncoding('utf8'); | |
| req.on('data', function(data) { | |
| body += data; |