Note that there are some explanatory texts on larger screens.

plurals
  1. POBest practices of building a website using Node.js
    primarykey
    data
    text
    <p>I was wondering how one would go about developing a website from scratch with Node.js. I understand how I could <em>possibly</em> do it, but I am interested in the <em>best</em> design practice.</p> <p>I need this theoretical website to:</p> <ol> <li>Do a lot of AJAX</li> <li>Be very straightforward</li> <li>Be relatively small</li> <li>Connect to... let's say a MySQL server</li> </ol> <p>In PHP, building a pretty small website was very straightforward - I set up PHP on Apache and a MySQL server and then do something like:</p> <ul> <li><code>includes/db/</code> which has connect.php for connecting to the db, a file with common db related functions and so on</li> <li><code>includes/layout/</code> which had stuff like footer.php, header.php, and other layout related stuff</li> <li><code>includes/users/</code> to handle user related actions</li> </ul> <p>Then PHP just let you build pages and include these files together to form a website - I could go something like:</p> <pre><code>&lt;?php require_once('inclues/users/user_session.php'); require_once('inclues/db/connect.php'); require_once('inclues/design/header.php') ?&gt; // Other php or html or related content relating to the page &lt;?php require_once('inclues/.../footer.php'); ?&gt; </code></pre> <p>I was wondering what might be similar in Node.js - I am looking for a way to accomplish this which is as <strong>simple</strong>, <strong>fast</strong> and <strong>straightforward</strong> as possible.</p> <p>If the answer is not simple, I would love a book recommendation, I don't mind reading.</p> <p>I love event based programming, I really love JavaScript's abilities and I'm really excited about Node.js. I want to learn how to develop this sort of stuff with it the right way from the start.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload