Skip to content

Instantly share code, notes, and snippets.

@yannick
Forked from pqwy/app.ls
Created November 12, 2012 16:29
Show Gist options
  • Save yannick/4060320 to your computer and use it in GitHub Desktop.
Save yannick/4060320 to your computer and use it in GitHub Desktop.
basic livescript/express scaffold
express = require \express
app = express!
..set \views, "#__dirname/../views"
..use express.static "#__dirname/../pub"
app.get '/', (req, res) ->
res.render 'index.jade'
app.listen 3001
@yannick
Copy link
Author

yannick commented Nov 12, 2012

but copy that, use src/ for server-side source, views/ for server-side templates, run it from lib/ into which it should compile
so, "mkdir -p win/src win/lib win/pub win/views"
save app.js into src
run "livescript -cwd -o lib/ src/" in another shell
...and edit that lone handler in that snipper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment