coffee-express
Version:
A Template for NodeJs Application using Express, CoffeeScript, Jade, and Stylus.
134 lines (99 loc) • 6.23 kB
HTML
<html><head><title>README</title><meta http-equiv="Content-Type" content="text/html" charset="UTF-8"><link rel="stylesheet" media="all" href="./docco.css"></head><body><div id="container"><div id="background"></div><div id="jump_to">Jump To …<div id="jump_wrapper"><div id="jump_page"><a href="./index.html" class="source"><span class="file_name">README</span></a><a href="./src/config/index.coffee.html" class="source "><span class="base_path">src / config / </span><span class="file_name">index.coffee</span></a><a href="./src/controllers/index.coffee.html" class="source "><span class="base_path">src / controllers / </span><span class="file_name">index.coffee</span></a><a href="./src/controllers/ping.coffee.html" class="source "><span class="base_path">src / controllers / </span><span class="file_name">ping.coffee</span></a><a href="./src/controllers/posts.coffee.html" class="source "><span class="base_path">src / controllers / </span><span class="file_name">posts.coffee</span></a><a href="./src/index.coffee.html" class="source "><span class="base_path">src / </span><span class="file_name">index.coffee</span></a><a href="./src/models/post.coffee.html" class="source "><span class="base_path">src / models / </span><span class="file_name">post.coffee</span></a><a href="./src/routes.coffee.html" class="source "><span class="base_path">src / </span><span class="file_name">routes.coffee</span></a></div></div></div><table cellpadding="0" cellspacing="0"><thead><tr><th class="docs"></th><th class="code"></th></tr></thead><tbody><tr id="section"><td class="docs"><h1>express-coffee
</h1><h3>Version</h3><p>1.5.1</p><h3>Dependencies </h3><ul><li><b>express </b><span>3.x</span></li><li><b>coffee-script </b><span>1.4.0</span></li><li><b>jade </b><span>0.26.0</span></li><li><b>connect-assets </b><span>2.3.3</span></li><li><b>stylus </b><span>0.27.x</span></li><li><b>nib </b><span>0.9.0</span></li><li><b>markdown </b><span>0.4.0</span></li><li><b>which </b><span>*</span></li><li><b>mongoose </b><span>*</span></li><li><b>wrench </b><span>*</span></li></ul><p><h3>Stats</h3><pre class="code_stats">
http://cloc.sourceforge.net v 1.55 T=0.5 s (14.0 files/s, 348.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
CoffeeScript 7 32 34 108
-------------------------------------------------------------------------------
SUM: 7 32 34 108
-------------------------------------------------------------------------------
</pre></p></td><td id="content" class="code"><h1>Express Coffee Template 5 (1.5)</h1>
<p>This is a Node Express CoffeeScript Stack Template</p>
<p>It comes ready to go with connect-assets that give you the option
to use coffee-script and stylus for the client side.</p>
<h2>Technologies</h2>
<p>This is a template that can be used to create nodejs applications using </p>
<ul>
<li>Node v0.6.17</li>
<li>Express v3.0.0rc2</li>
<li>CoffeeScript! v1.3.3</li>
<li>Jade v0.26.0</li>
<li>Connect Assets v2.2.1</li>
<li>MongoDB</li>
</ul>
<h2>Requirements</h2>
<ul>
<li><a href="http://nodejs.org">NodeJs</a></li>
<li><a href="http://expressjs.com">Express</a></li>
<li><a href="http://coffeescript.org">CoffeeScript</a></li>
<li><a href="http://jade-lang.com/">Jade</a></li>
<li><a href="http://github.com/TrevorBurnham/connect-assets">connect-assets</a></li>
<li><a href="http://visionmedia.github.com/mocha/">Mocha</a></li>
<li><a href="https://github.com/visionmedia/should.js/">Should.Js</a></li>
<li><a href="https://github.com/LearnBoost/mongoose">Mongoose</a></li>
<li><a href="http://foundation.zurb.com/">Foundation</a></li>
</ul>
<p>These will install with npm, just do </p>
<p><code>
npm install
</code></p>
<p>In your project directory.</p>
<hr />
<h2>Install, Build, Run, Test, and Watch</h2>
<p>```</p>
<h1>Install nodejs and npm</h1>
<p>git clone http://github.com/twilson63/express-coffee.git [project-name]
cd [project-name]
npm install
```</p>
<h2>Install coffee-script, mocha and docco</h2>
<p><code>sh
npm install coffee-script -g
npm install mocha -g
npm install docco -g
</code></p>
<h1>Run</h1>
<p><code>
cake dev
</code></p>
<h3>Mocha and Request for testing</h3>
<p>mocha is an extremely powerful and easy to use testing framework</p>
<p>see <a href="http://visionmedia.github.com/mocha/">http://visionmedia.github.com/mocha/</a></p>
<pre><code>describe 'Sample test', ->
it 'should be true', ->
true.should.equal true
</code></pre>
<p>to run mocha</p>
<pre><code>cake test
</code></pre>
<h3>Setup to deploy to heroku</h3>
<pre><code>rm -rf .git
git init
echo 'node_modules' >> '.gitignore'
git add .
git commit -am "first commit"
heroku create
git push heroku master
heroku open
</code></pre>
<h2>Thanks to</h2>
<ul>
<li><a href="https://github.com/jashkenas">Jeremy Ashkenas</a> for creating coffee-script</li>
<li><a href="https://github.com/visionmedia">TJ Holowaychuk</a> for creating express</li>
<li><a href="https://github.com/mhevery">Miško Hevery</a> for creating Jasmine-Node</li>
<li><a href="https://github.com/visionmedia">TJ Holowaychuk</a> for creating mocha and should.js</li>
</ul>
<h2>About</h2>
<p>express-coffee is a template or boiler-plate to get started writting
express web applications in CoffeeScript. It comes ready to go with base
setup for an Express Web App. It includes a Cakefile that lets you build,
spec, and watch your coffeescript as you develop. You hack in the src folder
and run cake build to build you server files, write your mocha in
your test folder and run cake test or spec to run your test suite. Create your
jade views in the views folder and put your public assets in the public
folder. Enjoy your express-coffee </p>
<h2>License</h2>
<p>See LICENSE</p>
<h2>Contribute</h2>
<p>pull requests are welcome</p> </td></tr></tbody></table><div id="generated">generated Sun Dec 23 2012 16:04:40 GMT-0800 (PST) </div></div></body></html>