Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Personally, I'd use a server that has higher level constructs. For instance, take a look at the expressjs framework - <a href="http://expressjs.com/" rel="noreferrer">http://expressjs.com/</a></p> <p>The constructs you'll be interested in from this package are:</p> <ul> <li>Truly static files (assets etc): app.use(express.static(__dirname + '/public'));</li> <li>A templating language such as jade, mustache, etc: <ul> <li><a href="http://expressjs.com/en/guide/using-template-engines.html" rel="noreferrer">http://expressjs.com/en/guide/using-template-engines.html</a></li> <li><a href="https://github.com/visionmedia/jade/" rel="noreferrer">https://github.com/visionmedia/jade/</a></li> <li>You'll want to look up 'locals' and 'partials' for embedding small bits of dynamic content in mostly static content</li> </ul></li> </ul> <p>For example in jade:</p> <pre class="lang-none prettyprint-override"><code>!!! 5 html(lang="en") head title= pageTitle script(type='text/javascript') if (foo) { bar() } body h1 Jade - node template engine #container - if (youAreUsingJade) p You are amazing - else p Get on it! </code></pre> <p>Becomes:</p> <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;title&gt;Jade&lt;/title&gt; &lt;script type="text/javascript"&gt; if (foo) { bar() } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Jade - node template engine&lt;/h1&gt; &lt;div id="container"&gt; &lt;p&gt;You are amazing&lt;/p&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>If you prefer something a little less <em>drastic</em> I would say look at mustache or one of the other engines that looks a bit more like regular-sauce html.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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