jpfluger / website-2-nodejs-marko-templates

A website primer for Node Express using Marko templates and Boostrap.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Website 2: NodeJS Marko Templates

A website primer for Node Express using Marko as the template engine. This site is built upon Website 1: NodeJS Starter which uses Twitter Bootstrap (v3.3), Bootstrap-Dialog, JQuery, lodash, numeral and moment.

Install node

Download NodeJS and install the version for your operating system.

Install npm and bower modules

We include a script, install.sh that initializes:

  • local npm modules in directory node_modules
  • local bower modules in directory bower_components

Then it copies only the required files from bower_components/ into public/_third/, a directory we use to serve public web pages.

Run installation:

./install.sh

Run

$ node server.js

Note: Type Ctrl-C to quit the server.

Open the client web browser to url http://localhost:8080.

About Marko

Marko.js is used by eBay to build web applications. It can be integrated with Express to respond to web requests. We began using Marko in 2014 because we liked how the tag system worked to compose layouts on the server-side. We especially liked the simplicity of the include tag and that templates pre-compiled into javascript. It made for tidy code. Since 2014, Marko has evolved to render pages on both server and the client (competing with React and Angular). For this demo, we are only using Marko on the server.

MIT Licensed

About

A website primer for Node Express using Marko templates and Boostrap.

License:MIT License


Languages

Language:HTML 47.0%Language:JavaScript 28.8%Language:Shell 23.0%Language:CSS 1.1%