Giter Club home page Giter Club logo

howtonode.org's Introduction

HowToNode.org

This is a community supported blog about how to program in nodejs.

This is powered by a new static blog engine written in node called wheat.

To run a local version of the blog, simply install wheat and it's dependencies, node.JS v0.1.101 or later.

If you have spark installed, just type spark in this directory. If not, append .listen(3000) right before the closing semicolon and run it with node app.js

You can get a working wheat environment out of the box with ivy.

Contributing

The best way to contribute is to fork this repository and add your article. If this is your first article, then please add an entry for yourself in the authors directory as well.

Article format

Every article is a markdown file with some meta-data at the top of the file.

Title: Control Flow in Node Part II
Author: Tim Caswell
Date: Thu Feb 04 2010 02:24:35 GMT-0600 (CST)
Node: v0.1.91

I had so much fun writing the last article on control flow, that I decided to...

## First section: Display JavaScript files

* display contents of external JavaScript file (path is relative to .markdown file)
<test-code/test-file.js>

* display contents of external JavaScript file and evaluate its contents
<test-code/evaluate-file.js*>

More content goes here.

Author format

Every author has a markdown file located in authors folder. You should name this file by your name and surname Name Surname.markdown.

Github:   your_github_account
Email:    [email protected]
Homepage: http://yourhomepage.com
Twitter:  your_twitter_account
Location: City, State, Country

A few words about you.

Starting the project on your local machine

Please check if the project is still working after you add your contribution to it. You can run the project in three easy steps:

  1. Install the npmpackages: npm install
  2. Start the server: node server/server.js
  3. Enjoy your local blog clone at http://localhost:8080

More docs to come soon...

Licensing

All articles are copyright to the individual authors. Authors can put notes about license and copyright on their individual bio pages if they wish.

howtonode.org's People

Contributors

bengourley avatar carolinebda avatar ciaranj avatar codelotus avatar creationix avatar cskr avatar dandv avatar deltasquare4 avatar doomhz avatar focusaurus avatar gflarity avatar isaacs avatar jpmonette avatar kadirpekel avatar kishorenc avatar lidmx avatar loarabia avatar miksago avatar moskyb avatar nawazdhandala avatar ncb000gt avatar nikhilm avatar nrstott avatar rsdoiel avatar sri-rang avatar swapnilmishra avatar tbassetto avatar tim-smart avatar tvcutsem avatar vojtajina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

howtonode.org's Issues

An update broke everything

My website is down, whoops

It must have been after running npm update
I pulled the latest code from howtonode.org and it does not load creationix

I use this site for nerdland.info:
https://github.com/xulrunner42/marty-nerdland

It's my favorite blog engine!

[yebyen@marty ~/howtonode.org]$ node server/server.js 

module.js:340
    throw err;
          ^
Error: Cannot find module 'creationix'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/home/yebyen/howtonode.org/server/server.js:3:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Cannot get started running

Hey all,

I cannot get started with this thing, i have successfully install wheat, connect, cluster, and i also added .listen(3000) to the end of app.js (before ;), i get the following error:
jason@ubuntu howtonode.org % node app.js

node.js:178
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object function createServer() {
if ('object' == typeof arguments[0]) {
return new HTTPSServer(arguments[0], Array.prototype.slice.call(arguments, 1));
} else {
return new HTTPServer(Array.prototype.slice.call(arguments));
}
} has no method 'conditionalGet'
at Object. (/home/jason/howtonode.org/app.js:6:11)
at Module._compile (module.js:404:26)
at Object..js (module.js:410:10)
at Module.load (module.js:336:31)
at Function._load (module.js:297:12)
at Array. (module.js:423:10)
at EventEmitter._tickCallback (node.js:170:26)

If anyone have any idea of what is going on it would be much appreciated if you can enlighten me, thanks a lot!

Jason

Render feed

% curl 'http://howtonode.org/feed.xml'
TODO: render feed

Obviously it's a known issue ;) but I thought I'd flag it on behalf of myself and the other 395 subscribers to the feed at www.inoreader.com.

RSS feed is too large

http://howtonode.org/feed.xml is currently 516,54 KB (528 940 bytes) long and contains 45 entire blog entries.

That is probably the reason why LiveJournal syndicated feed at rss-how-to-node.livejournal.com fails (says «Too big»).

And so I cannot read «How To Node» on my LiveJournal «Friends» page comfortably.

Please force your RSS feed to contain only five or six or ten entries.

Update "Understanding process.nextTick()"

@kishorenc: looks like there have been some changes to nextTick() in node v0.10, which make the usage of nextTick() in the article "completely wrong".

It would be great for beginners to have that article updated. Thanks!

Missing links to articles, missing example code in article...

Hi. How come there are over 50 articles in the repo, yet only 20 are linked to in the right sidebar on the blog under "Articles" ? Does that mean they fail this:

If your article passes the quality standards it will be published and help support the greater node community.

Is the blog page up to date? Is the blog page even active anymore? Is anyone vetting this stuff?

In a GoogleGroups post of 9/15/10 - https://groups.google.com/forum/?fromgroups#!topic/nodejs/O7_hUolYdBQ - you (Tim Caswell) allude to an article by "Isaac" e.g. {"See Isaac's article on howtonode.org about control flow in npm."}, yet there is no link to that article on that blog page. I had to go hunt it down in the repo. Since it's not "published", does that mean it fails the quality standards?

I guess it does, because...

... the article is missing a reference to some critical example code, i.e.:

Note that the top-level cb_ function is called with an array of all the results. So, data is being proxied up, as well as errors. (That's why it's called asyncMap, rather than asyncForEach.)

So, now we can simply do this:

                                             {{{ DO WHAT??? THERE'S   n o t h i n g   t h e r e   in  article !!!!!}}}

Proxying

You catch that? An Action function can pass its own cb over to another Action function if it doesn't need to do anything with success or failure. We could also have done something like this:

Ok, "You catch WHAT???"
I am assuming there was meant to be some example code shown there... (or at least a link to it) and I am also assuming it is supposed to be this: https://github.com/creationix/howtonode.org/blob/master/articles/flow-control-in-npm/async-map.js
which I also had to go hunt down.

OK, so that article is not "published", but this one is? http://howtonode.org/understanding-process-next-tick
It was roundly ripped to shreds by other posters for the examples being just plain wrong, the concept explanations being convoluted and conflated, etc. So is that an example of an article that "passes quality standards"?
At least it gave me some ideas to try in my problem app.

So what to believe? Obviously, only what I try and work out for myself, based on shreds of information gleaned from... this kinda stuff. I need to fire a variable number of async tasks, and be able to wait for completion to deal with the results. So my home-grown solution now uses nextTick and setTimeout and callbacks and now fires up to 5500 fs.readFile tasks and waits for completion with no problem. But I know there has to be a better pattern than what I am using. (fs.readFile is not the problem domain, just what I picked as a truly async task for experimentation purposes. The real problem domain is MongoDb collection.count()-related idiocy.)

I need to understand this stuff, and problems like this are not helping.

So since the control flow article by "Isaac" is not "published", it has no comments by readers, as the nextTick article does, so I cannot gauge its relative efficacy, except by time-consuming experimentation and testing.
What is the current assessment of its "quality"? Is it still recommended reading, even with its apparent deficiencies?

Thanks,
Dave

Incorrect code

var name = "outer";
function () {
  var name = "middle";
  var other "findme";
  function () {
    var name = "inner"
     // Here `name` is "inner" and `other` is "findme"
  }
  // Here `name` is "middle" and `other` is "findme"
}
// Here `name` is "middle" and `other` is undefined.

The last comment is incorrect, it should instead state

// Here `name` is "outer" and `other` is undefined

OR line 3:

  var name = "middle";

should be changed to

  name = "middle";

This code example is also not "runnable" in node, it gives a SyntaxError.

Also, if appropriate, you could link to "Act III" of Crockford on JavaScript, where he held an extensive presentation on functions and scope in JavaScript which I think follows nicely to this tutorial.

Thanks for a great article!

~adamse

Old welcome.html page missing

FWIW this is linked to from http://groups.google.com/group/nodejs/msg/c94a315369fdcdfc

Perhaps there could be a redirect.

Error: git --git-dir=/home/tim/git/howtonode.org.git show d4fd940e58e219353a68086f675feed67c8dbf8c:articles/welcome.html
fatal: Path 'articles/welcome.html' does not exist in 'd4fd940e58e219353a68086f675feed67c8dbf8c'

at ChildProcess.<anonymous> (/home/tim/ivy/lib/node/git.js:176:16)
at ChildProcess.emit (events:33:26)
at ChildProcess.onexit (child_process:150:12)
at node.js:265:9

node app.js not work

after i installed node v0.4.8,npm 1.0.14,wheat,and then download howtonode.org to my local path and set the .listen(3000),but when i use node app.js to start the site,error happens
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object function createServer() {
if ('object' == typeof arguments[0]) {
return new HTTPSServer(arguments[0], Array.prototype.slice.call(arguments, 1));
} else {
return new HTTPServer(Array.prototype.slice.call(arguments));
}
} has no method 'conditionalGet'
at Object. (/Users/amdgigabyte/Sites/howtonode.org/app.js:6:11)
at Module._compile (module.js:407:26)
at Object..js (module.js:413:10)
at Module.load (module.js:339:31)
at Function._load (module.js:298:12)
at Array. (module.js:426:10)
at EventEmitter._tickCallback (node.js:126:26)

The site is out.

When i try to access the site "howtonode.org" i got a message that was writed like:

"Internal Server Error"

Will it be appreciated if I will write some articles?

can't start server

module.js:340
throw err;
^
Error: Cannot find module 'creationix'

And yes, I ran npm install.

node server/server.js fails on windows 10

Hans@HP-HANS C:\Users\Hans\Web\bootcamps\hsr\cas-fee-2016\howtonode.org-wheat-blog-engine

git branch

  • master

Hans@HP-HANS C:\Users\Hans\Web\bootcamps\hsr\cas-fee-2016\howtonode.org-wheat-blog-engine

node server/server.js
module.js:341
throw err;
^

Error: Cannot find module 'creationix'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (C:\Users\Hans\Web\bootcamps\hsr\cas-fee-2016\howtonode.org-wheat-blog-engine\server\server.js:3:18)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)

"Code" showing

Something must have went wrong during the latest update. Take a look at this post http://howtonode.org/express-mongodb

Things like

<<<<<<< HEAD:articles/express-mongodb.markdown { id: 0, title: '', body: '', comments: [{ person: '', comment: '', createdat: new Date()

}],

are everywhere.

Wheat crashes when loading "The Step of the Conductor"

Hello. After a fresh checkout of this repo, and invoking wheat once it's installed, the blog appears to work properly. However, without fail every time I click on the The Step of the Conductor article, node crashes. Here's stderr:

Starting wheat server using git repo at /Users/nrajlich/howtonode.org
http://*:8080/
127.0.0.1 - - [Tue, 29 Jun 2010 19:46:12 GMT] "GET / HTTP/1.1" 200 5760 "" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.86 Safari/533.4"
127.0.0.1 - - [Tue, 29 Jun 2010 19:46:12 GMT] "GET /volcano.css HTTP/1.1" 200 1925 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.86 Safari/533.4"
127.0.0.1 - - [Tue, 29 Jun 2010 19:46:13 GMT] "GET /volcano.jpg HTTP/1.1" 200 134814 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.86 Safari/533.4"
127.0.0.1 - - [Tue, 29 Jun 2010 19:46:13 GMT] "GET /Artbrush.ttf HTTP/1.1" 200 22172 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.86 Safari/533.4"
process.evalcx is deprecated. Use Script.runInNewContext instead.
127.0.0.1 - - [Tue, 29 Jun 2010 19:46:19 GMT] "GET /step-of-conductor HTTP/1.1" 200 6691 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.86 Safari/533.4"


events:11
        throw arguments[1];
                       ^
Error: EPIPE, Broken pipe
    at Stream._writeImpl (net:321:14)
    at Stream._writeOut (net:749:25)
    at Stream.write (net:682:17)
    at execPipe (/Users/nrajlich/.node_libraries/wheat/renderers.js:37:17)
    at Function.processFile (/Users/nrajlich/.node_libraries/wheat/renderers.js:232:9)
    at next (/Users/nrajlich/.node_libraries/wheat/step.js:49:23)
    at /Users/nrajlich/.node_libraries/wheat/git.js:91:23
    at /Users/nrajlich/.node_libraries/wheat/git.js:236:5
    at fs:81:13
    at node.js:255:9

I'm not sure if it's something inside the article that is breaking wheat or what, but the official http://howtonode.org/step-of-conductor link seems to work fine...

404 errors on all dynamic content

I've installed wheat using npm, and cloned this git repo, but when I start the wheat server (using spark) I get 404 errors for all content not found in the skin/public folder -- I can get static files served, but all other content returns a pretty sparse 404 error. I'd be happy to provide more details, but don't actually know what to look for at this point; a brief glance through a few of the source files didn't lead me to any glaring errors I'd made.

why it still says : Cannot find module 'creationix'?

hi.

as3:/howtonode.org-site# npm install creationix
npm WARN package.json [email protected] cluster is also the name of a node core module.
npm http GET https://registry.npmjs.org/creationix
npm http 304 https://registry.npmjs.org/creationix
npm http GET https://registry.npmjs.org/send
npm http 304 https://registry.npmjs.org/send
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/fresh/0.2.0
npm http 304 https://registry.npmjs.org/mime
[email protected] node_modules/creationix
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
as3:
/howtonode.org-site# node server/server.js

module.js:340
throw err;
^
Error: Cannot find module 'creationix'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/root/howtonode.org-site/server/server.js:3:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
as3:~/howtonode.org-site#

how to fix it?thank u

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.