UNPKG

learnyounode

Version:

Learn You The Node.js For Much Win! An intro to Node.js via a set of self-guided workshops.

63 lines 3.63 kB
{ "title": "LEARN YOU THE NODE.JS FOR MUCH WIN!", "common": { "exercise": { "pass": { "sync": "Used synchronous method: {{{method}}}", "async": "Used asynchronous method: {{{method}}}" }, "fail": { "sync": "Used synchronous method: {{{method}}}", "async": "Used asynchronous method: {{{method}}}", "unused": "Used asynchronous method from the `fs` module.", "unexpected_error": "Unexpected error from HTTP server: {{{message}}}", "connection": "Error connecting to {{{address}}}: {{{message}}}" } } }, "exercises": { "MAKE IT MODULAR": { "fail": { "missing_module": "Did not use an additional module file, you must require() a module to help solve this exercise", "loadError": "Error loading module file [{{path}}]: {{{message}}}", "mod": { "_base": "Your additional module file [{{path}}] {{{message}}}", "no_export": "does not export a **single function**. You must use the `module.exports = function () {}` pattern.", "arguments": "exports a function that takes fewer than **three** arguments. You must accept a directory, a filter and a **callback**.", "missing_callback": "did not call the callback argument after an error from fs.readdir()", "missing_error": "does not appear to pass back an error received from `fs.readdir()`.\n Use the following idiomatic Node.js pattern inside your callback to `fs.readdir()`:\n\tif (err)\n\t return callback(err)", "callback_arguments": "did not return two arguments on the callback function (expected `null` and an Array of filenames)", "dont_use_dot": "appears to be expecting a '.'-prefixed extension, it should receive the second command-line argument without the added '.'", "array_wrong_size": "did not return an Array with the correct number of elements as the second argument of the callback", "dotExt": "may be matching \"ext\" instead of \".ext\"", "array_comparison": "did not return the correct list of files as the second argument of the callback", "missing_array_argument": "did not return an Array object as the second argument of the callback", "callback_error": "returned an error on its callback:\n\t{{{error}}}", "timeout": "did not call the callback argument", "unexpected": "threw an error:\n\t{{{error}}}" } }, "pass": { "singleFunction": "Additional module file exports a single function", "arguments": "Additional module file exports a function that takes {{{count}}} arguments", "error": "Additional module file handles errors properly", "callback": "Additional module file handles callback argument", "callback_arguments": "Additional module file returned two arguments on the callback function", "array_argument": "Additional module file returned an Array as the second argument of the callback", "dont_use_dot": "Additional module file correctly handles '.'-prefixed extension", "array_size": "Additional module file returned correct number of elements as the second argument of the callback", "final": "Additional module file returned correct list of files as the second argument of the callback" } }, "TIME SERVER": { "fail": { "connection": "Error connecting to localhost:{{port}}: {{{message}}}" } }, "HTTP FILE SERVER": { "fail": { "no_createReadStream": "Used fs method other than fs.createReadStream(): {{{method}}}" } } } }