garritfra
6 years ago
3 changed files with 6754 additions and 0 deletions
@ -0,0 +1,17 @@
|
||||
{ |
||||
"name": "blockchain-project", |
||||
"version": "1.0.0", |
||||
"description": "Blockchain", |
||||
"scripts": { |
||||
"start": "tsc src/app.ts && node dist/app.js" |
||||
}, |
||||
"author": "@garritfra", |
||||
"license": "ISC", |
||||
"dependencies": { |
||||
"parcel": "^1.10.3", |
||||
"parcel-bundler": "^1.10.3" |
||||
}, |
||||
"devDependencies": { |
||||
"typescript": "^3.1.6" |
||||
} |
||||
} |
@ -0,0 +1,17 @@
|
||||
const net = require("net"); |
||||
const server = net.createServer(c => { |
||||
//'connection' listener
|
||||
console.log("client connected"); |
||||
|
||||
c.on("end", () => { |
||||
console.log("client disconnected"); |
||||
}); |
||||
|
||||
c.write("Hi!"); |
||||
c.pipe(c); |
||||
}); |
||||
|
||||
server.listen(42, () => { |
||||
//'listening' listener
|
||||
console.log("server bound"); |
||||
}); |
Loading…
Reference in new issue