Forked from our internal style guide, this is a stripped down framework for hacking at HTTP API's with Node.js
Content templates are located under /public/views/, and is powered by GitHub Flavored Markdown and Swig Templating.
- Home Brew (Mac):
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"thenbrew doctor - Node.js:
brew install nodeor by downloading an installing from Nodejs.com - Bower for client-side package management:
npm install -g bower
- Open up the command line and change to a directory where you want to install the app:
cd ~/Sites - Clone the repo to your machine:
git clone git@github.com:technologyreview/node-app.git; cd node-app - Install node packages:
npm install - Run the
gulpcommand to build the project. This will install package dependencies usingbower, and then start the local server - Open the browser to
http://localhost:9999
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/*.lessfile is saved - Backbone.js
- Require.js for AMD
- Swig templating
- GitHub Flavored Markdown is automatically compiled when used in templates