This file contains 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
// Premise: | |
// Your app interacts with some data resource. | |
// There is a route registered per resource type. | |
// After requesting a resource of a certain type, it's possible for the data to be of another type. | |
// E.g. You're requesting a category from an API but you are served a member of that category | |
// instead because there is only one member in the category. | |
// this route catches all incoming category requests | |
app.get( | |
'/category/:category_id', |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
(function(n,c){require('fs').writeFile('/somePath/'+n+'.html',c);})('${1:c}',${1}); // @test | |
]]></content> | |
<tabTrigger>write</tabTrigger> | |
<description>fs.writeFile()</description> | |
<scope>source.js</scope> | |
</snippet> |
NewerOlder