Skip to content

Instantly share code, notes, and snippets.

@leongaban
Created February 18, 2015 16:02
Show Gist options
  • Save leongaban/9a7b7c4e52372d5de3e5 to your computer and use it in GitHub Desktop.
Save leongaban/9a7b7c4e52372d5de3e5 to your computer and use it in GitHub Desktop.
Sublime Text 2 - ExpressJS snippet
<snippet>
<content><![CDATA[
var express = require('express'),
app = express();
app.get('/', function(req, res) {
res.sendfile(__dirname + '/client/views/index.html');
})
app.listen(${1:this}, function() {
console.log('I\'m listening... on port ${2:snippet}');
})
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>express</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment