Skip to content

Instantly share code, notes, and snippets.

View aneopsy's full-sized avatar
🐋
From Prolo To Lambo

AneoPsy aneopsy

🐋
From Prolo To Lambo
  • Bora-bora
View GitHub Profile
@aneopsy
aneopsy / blockchain.js
Created November 1, 2019 16:53
Blockchain in JS (websocket)
'use strict';
var CryptoJS = require("crypto-js");
var express = require("express");
var bodyParser = require('body-parser');
var WebSocket = require("ws");
var http_port = process.env.HTTP_PORT || 3001;
var p2p_port = process.env.P2P_PORT || 6001;
var initialPeers = process.env.PEERS ? process.env.PEERS.split(',') : [];
did:muport:QmVMzmKnPR79SwPnS6t4HUS5dEy5q2Khgi1jQGzpHLzHHC