Skip to content

Instantly share code, notes, and snippets.

@rmjoia
Last active January 14, 2016 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmjoia/0d66edafd952c6b97cd0 to your computer and use it in GitHub Desktop.
Save rmjoia/0d66edafd952c6b97cd0 to your computer and use it in GitHub Desktop.
{
/*
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"express.get middleware": {
"prefix": "expg",
"body": [
"app.get('$1', function(request, response) {;",
" response.$2($3);",
"});",
"",
"",
"app.listen($4);"
],
"description": "Creates a new expreess get route"
},
/*
* Tests
*/
"mocha test": {
"prefix": "mtest",
"body": [
"describe('$1', function() {;",
"",
" it('$2', function(done) {",
" $3",
" });",
"});"
],
"description": "Creates new mocha test"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment