-
-
Save yannick/4060320 to your computer and use it in GitHub Desktop.
basic livescript/express scaffold
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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