Node.js powered publishing front-end
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.ebextensions
public
views
.bowerrc
.gitignore
Procfile
app.js
bower.json
gulpfile.js
node-app.sublime-project
nodemon.json
package.json
readme.md

readme.md

Node App Framework

Forked from our internal style guide, this is a stripped down framework for hacking at HTTP API's with Node.js

Content

Content templates are located under /public/views/, and is powered by GitHub Flavored Markdown and Swig Templating.

Requirements

  1. Home Brew (Mac): ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" then brew doctor
  2. Node.js: brew install node or by downloading an installing from Nodejs.com
  3. Bower for client-side package management: npm install -g bower

Installation (Mac)

  1. Open up the command line and change to a directory where you want to install the app: cd ~/Sites
  2. Clone the repo to your machine: git clone git@github.com:technologyreview/node-app.git; cd node-app
  3. Install node packages: npm install
  4. Run the gulp command to build the project. This will install package dependencies using bower, and then start the local server
  5. Open the browser to http://localhost:9999

Systems

More info on the tools and systems used.

  • Gulp is used to automate build and compile processes
  • Node.js is used for generating a micro HTTP server that serves routes and server-side JavaScript
  • Express is a Node web app framework used for MVC routing
  • Nodemon will monitor for any changes in your node.js application and automatically restart the server
  • LiveReload is loaded by Gulp, and is used to for injecting CSS updates into the browser when a /public/less/*.less file is saved
  • Backbone.js
  • Require.js for AMD
  • Swig templating
  • GitHub Flavored Markdown is automatically compiled when used in templates