This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html, body { | |
| font-family: "Lucida Sans Typewriter", "Lucida Console", "Bitstream Vera Sans Mono", monospace; | |
| height: 100%; | |
| } | |
| #main { | |
| width: 50%; | |
| margin: 0 auto; | |
| padding-top: 2%; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'babel-polyfill' // We need this for async/await polyfills | |
| // Import our two IPFS-based modules | |
| import getIpfs from 'window.ipfs-fallback' | |
| import crypto from 'libp2p-crypto' | |
| let ipfs | |
| // Setup a very simple async setup function to run on page load | |
| const setup = async () => { | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h1>Welcome to Encryptoid!</h1> | |
| <form id="secret"> | |
| <label for="message">Message</label> | |
| <textarea id="message" required rows="5"></textarea> | |
| <label for="password">Password</label> | |
| <input id="password" type="text" required minlength="10" maxlength="100"> | |
| </form> | |
| <button id="button" type="button">Encrypt</button> | |
| <div id="output"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'babel-polyfill' // We need this for async/await polyfills | |
| // Import our two IPFS-based modules | |
| import getIpfs from 'window.ipfs-fallback' | |
| import crypto from 'libp2p-crypto' | |
| let ipfs | |
| // Setup a very simple async setup function to run on page load | |
| const setup = async () => { | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| crypto.aes.create(Buffer.from(key), iv, (err, cipher) => { | |
| if (!err) { | |
| cipher.decrypt(Buffer.from(message.value, 'base64'), async (err, plain) => { | |
| if (!err) { | |
| output.innerText = `${plain.toString('utf-8')}` | |
| } | |
| }) | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| server_name ipfs.my-domain-name.com; | |
| listen [::]:4002 ssl ipv6only=on; | |
| listen 4002 ssl; | |
| ssl_certificate /etc/letsencrypt/live/ipfs.my-domain-name.com/fullchain.pem; # managed by Certbot | |
| ssl_certificate_key /etc/letsencrypt/live/ipfs.my-domain-name.com/privkey.pem; # managed by Certbot | |
| include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
| ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | |
| location / { | |
| proxy_pass http://127.0.0.1:8081; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf8"> | |
| <title>Demo Profile ĐApp</title> | |
| <link rel="stylesheet" href="./style.css"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/solid.css" integrity="sha384-wnAC7ln+XN0UKdcPvJvtqIH3jOjs9pnKnq9qX68ImXvOGz2JuFoEiCjT8jyZQX2z" crossorigin="anonymous"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/brands.css" integrity="sha384-nT8r1Kzllf71iZl81CdFzObMsaLOhqBU1JD2+XoAALbdtWaXDOlWOZTR4v1ktjPE" crossorigin="anonymous"> | |
| <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/fontawesome.css" integrity="sha384-HbmWTHay9psM8qyzEKPc8odH4DsOuzdejtnr+OFtDmOcIVnhgReQ4GZBH7uwcjf6" crossorigin="anonymous"> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf8"> | |
| <title>Chat ĐApp</title> | |
| <link rel="stylesheet" href="./style.css"> | |
| </head> | |
| <body> | |
| <div id="main"> | |
| <div class="controls"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'babel-polyfill' | |
| import Room from 'ipfs-pubsub-room' | |
| import IPFS from 'ipfs' | |
| import ko from 'knockout' | |
| import queryString from 'query-string' | |
| // Global references for demo purposes | |
| let ipfs | |
| let viewModel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| "scripts": { | |
| "setup": "yarn install", | |
| "release": "npm version patch", | |
| "postversion": "git push --follow-tags", | |
| "build": "run-s build:*", | |
| "build:copy": "run-p build:copy:*", | |
| "build:copy:html": "shx mkdir -p dist && shx cp index.html dist/index.html", | |
| "build:copy:images": "shx mkdir -p dist/img && shx cp img/* dist/img", | |
| "build:copy:css": "shx mkdir -p dist/css && shx cp css/*.css dist/css", |