Created
October 9, 2017 05:55
-
-
Save nailkhasipov/e91d6d7e6bc6c582034223fe5fb7f265 to your computer and use it in GitHub Desktop.
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
var mustache = require("mustache"); | |
var fs = require("fs"); | |
fs.readFile("app/views/index.mustache", function (err, data) { | |
if (err) throw err; | |
var output = mustache.render(data.toString(), {}); | |
fs.writeFile('public/index.html', output, function (err) { | |
if (err) throw err; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment