Use ExpressJS and do not reinvent the wheel.
If you want to learn NodeJS that is okay, if you want to make it fast here 
are steps:

   - npm install express -g # installing expressjs globaly
   - express test-project # creating new project
   - cd test-project
   - npm install # installing all dependencies
   - put all your html files into /public folder
   - cd to test-project directory and execute node app
   

среда, 13 марта 2013 г., 16:15:19 UTC+6 пользователь Timo Schmidt написал:
>
> Hi,
>
> i am quite new to node.js. I am trying to use bootstrap to node.js and 
> tried the classic way. I simply wrote the "getting started code" of 
> bootstrap to node.js just to try it. But when I'm trying to use simple 
> rows/spans I get no good output. When I check it with firebug, I can see, 
> that there would be no rule in the bootstrap.css (but there are).
>
> Node.js Code:
>   function onRequest(req, res) {
>     var postData = "";
>     var pathname = url.parse(req.url).pathname;
>     console.log("Request recieved");
>
>    res.writeHead(200, {"Content-Type": "text/html"});
>   res.write("<head>");
>   res.write("<title>Bootstrap 101 Template</title>");
>   res.write("<meta name='viewport' content='width=device-width, 
> initital-scale=1.0'>");
>   res.write("<link href='css/bootstrap.min.css' rel='stylesheet' 
> media='screen'>");
>   res.write("</head>");
>   
>   res.write("<body>");
>   res.write("<div class='container'>");
>   res.write("<div class='row show-grid'>");
>   res.write("<div class='span4'>4</div>");
>   res.write("<div class='span8'>8</div>");
>   res.write("</div>");
>   res.write("</div>");
>   res.write("<script src='jquery/jquery'></script>");
>   res.write("<script src='js/bootstrap.min.js'></script>");
>   res.write("</body>");
>   res.end();
>         
>   }
>
>   http.createServer(onRequest).listen(8888);
>   console.log('Server has started!');
>
>
> HTML Code:
> <html debug="true">
> <head>
> <title>Bootstrap 101 Template</title>
> <meta name="viewport" content="width=device-width, initital-scale=1.0"/>
> <link href="css/bootstrap.min.css" rel="stylesheet" media="screen"/>
> <style type="text/css"/>
> </head>
> <body>
> <div class="container">
> <script src="jquery/jquery"/>
> <script src="js/bootstrap.min.js"/>
> </body>
> <script src="
> chrome-extension://bmagokdooijbeehmkpknfglimnifench/googleChrome.js"/>
> </html>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to