I just got my raspberry pi and i'm experimenting node.js on it. Specifically I'm making a web server to serve my own node.js web site. I'm a little puzzled by the process logs though. When i run my node app, a single node process is started as normal, no surprises: http://screencast.com/t/8SQY3qDvxkK
Now when I visited the page, i see my process logs CPU spike up to 100% and 4 other node.js process is spawned. Very strange behavior. http://screencast.com/t/ushqLDINxYV
The web page i'm requesting is just a simple html with a few divs and loading a bunch of javascript / css assets like jQuery, bootstrap.
I attached my html for those who are keen to replicate.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello World</title>
<meta charset="utf_8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300">
<link rel="stylesheet" href="/lib/bootstrap-3.0.0rc1/css/bootstrap.min.css">
<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="/css/style.css">
</head>
<body style="zoom:1;">
<div class="container-fluid">
<div class="logo">
</div>
<nav>
<ul class="menu nav">
<li><a href="#"><i class="icon-home"></i></a></li>
<li><a href="#"><i class="icon-user"></i></a></li>
<li><a href="#"><i class="icon-th"></i></a></li>
<li><a href="#"><i class="icon-envelope"></i></a></li>
</ul>
</nav>
</div>
<script src="/lib/jquery-1.9.1.min.js"></script>
<script src="/lib/bootstrap-3.0.0rc1/js/bootstrap.min.js"></script>
</body>
</html>
Anyone has any clue why this is happening? This does not happen if the my server is simply sending a response message like "res.send('hi there')" instead of rendering html "res.render("hello.jade")"