finnp / test Goto Github PK
View Code? Open in Web Editor NEWtest
License: Apache License 2.0
test
License: Apache License 2.0
command not found
test
the TCP net server worked for the previous exercise (time server), but when running the code for the httpserver through learnyounode run/verify, it will refuse all connections:
PS path\to\lyn> learnyounode run .\fileserver.js
โ Error connecting to (http://localhost:45134): connect ECONNREFUSED
127.0.0.1:45134PS path\to\lyn> learnyounode run .\fileserver.js
โ Error connecting to (http://localhost:8049): connect ECONNREFUSED
127.0.0.1:8049
If I just run it via node .\fileserver.js 45134 timeserver.js (or any other port, file in directory) I can then point my browser at http:/localhost:port/ and see the response without issue.
Note that I've also tried using the solution from learnyounode\exercises\http_file_server\solution\solution.js with the same connection refusal.
Ideas?
var http = require('http');
var fs = require('fs');
var port = Number(process.argv[2]);
var file = process.argv[3];
var server = http.createServer(function(req, res){
res.writeHead(200, { 'content-type' : 'text/plain' });
fs.createReadStream(file).pipe(res);
});
server.listen(port);
test
node test
help
test
dfdf
help node
TODO
node test another
hello
command not found
the TCP net server worked for the previous exercise (time server), but when running the code for the httpserver through learnyounode run/verify, it will refuse all connections:
PS path\to\lyn> learnyounode run .\fileserver.js
โ Error connecting to (http://localhost:45134): connect ECONNREFUSED
127.0.0.1:45134PS path\to\lyn> learnyounode run .\fileserver.js
โ Error connecting to (http://localhost:8049): connect ECONNREFUSED
127.0.0.1:8049
If I just run it via node .\fileserver.js 45134 timeserver.js (or any other port, file in directory) I can then point my browser at http:/localhost:port/ and see the response without issue.
Note that I've also tried using the solution from learnyounode\exercises\http_file_server\solution\solution.js with the same connection refusal.
Ideas?
var http = require('http');
var fs = require('fs');
var port = Number(process.argv[2]);
var file = process.argv[3];
var server = http.createServer(function(req, res){
res.writeHead(200, { 'content-type' : 'text/plain' });
fs.createReadStream(file).pipe(res);
});
server.listen(port);
command not found
menu.writeLine(chalk.bold(__('title'))
TypeError: Cannot read property 'writeLine' of null
at LegacyWorkshopper.Adventure.printMenu (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:499:7)
at LegacyWorkshopper.Adventure.execute (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:223:8)
at new LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:14:8)
at LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:8:12)
at Object. (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\learnyoureact.js:10:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
sdflkjsdlfjsoisdfjsdiofjkm, sdflkdsfjlksdjfiosfdqoqo
menu.writeLine(chalk.bold(__('title'))
TypeError: Cannot read property 'writeLine' of null
at LegacyWorkshopper.Adventure.printMenu (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:499:7)
at LegacyWorkshopper.Adventure.execute (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:223:8)
at new LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:14:8)
at LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:8:12)
at Object. (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\learnyoureact.js:10:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
exercise 3
menu.writeLine(chalk.bold(__('title'))
TypeError: Cannot read property 'writeLine' of null
at LegacyWorkshopper.Adventure.printMenu (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:499:7)
at LegacyWorkshopper.Adventure.execute (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:223:8)
at new LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:14:8)
at LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:8:12)
at Object. (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\learnyoureact.js:10:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
command not found
learnyounode not working
command not found
f
test
command not found
est
menu.writeLine(chalk.bold(__('title'))
TypeError: Cannot read property 'writeLine' of null
at LegacyWorkshopper.Adventure.printMenu (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:499:7)
at LegacyWorkshopper.Adventure.execute (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\adventure.js:223:8)
at new LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:14:8)
at LegacyWorkshopper (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\node_modules\workshopper-adventure\index.js:8:12)
at Object. (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\learnyoureact\learnyoureact.js:10:1)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
d
help example
another node test
Solution ===================
Hello, world!
Your Attempt ===================
Hello, world!
Difference ===================
Hello, world!
Hello, world!
#!/usr/bin/env bash
echo "Hello, world!"
This code is not executing despite having the same output. Thanks!
test node
help
command not found
the TCP net server worked for the previous exercise (time server), but when running the code for the httpserver through learnyounode run/verify, it will refuse all connections:
PS path\to\lyn> learnyounode run .\fileserver.js
โ Error connecting to (http://localhost:45134): connect ECONNREFUSED
127.0.0.1:45134PS path\to\lyn> learnyounode run .\fileserver.js
โ Error connecting to (http://localhost:8049): connect ECONNREFUSED
127.0.0.1:8049
If I just run it via node .\fileserver.js 45134 timeserver.js (or any other port, file in directory) I can then point my browser at http:/localhost:port/ and see the response without issue.
Note that I've also tried using the solution from learnyounode\exercises\http_file_server\solution\solution.js with the same connection refusal.
Ideas?
var http = require('http');
var fs = require('fs');
var port = Number(process.argv[2]);
var file = process.argv[3];
var server = http.createServer(function(req, res){
res.writeHead(200, { 'content-type' : 'text/plain' });
fs.createReadStream(file).pipe(res);
});
server.listen(port);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.