MCPcopy Index your code
hub / github.com/codecombat/codecombat / getStaticTemplate

Function getStaticTemplate

server_setup.js:239–243  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

237
238const templates = {};
239const getStaticTemplate = function(file) {
240 // Don't cache templates in development so you can just edit then.
241 if (templates[file] && config.isProduction) { return templates[file]; }
242 return templates[file] = fs.readFileAsync(path.join(publicPath, 'templates', 'static', file), 'utf8');
243};
244
245const renderMain = wrap(function*(template, req, res) {
246 template = yield getStaticTemplate(template);

Callers 1

server_setup.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected