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.
Download NodeJS and install the version for your operating system.
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
$ node server.js
Note: Type Ctrl-C to quit the server.
Open the client web browser to url http://localhost:8080.
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.