mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-04-01 02:42:23 -05:00
Got handlebars templates working right
This commit is contained in:
parent
37afd429ec
commit
bb129c1151
3 changed files with 13 additions and 3 deletions
10
lib/GUI/index.handlebars
Normal file
10
lib/GUI/index.handlebars
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!doctype html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ name }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ name }}</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -121,7 +121,7 @@ module.exports = function(config_hash) {
|
|||
})
|
||||
})*/
|
||||
|
||||
var template = Handlebars.compile(fs.readFileSync('../lib/GUI/index.handlebars', {encoding: 'UTF-8'}));
|
||||
var template = Handlebars.compile(fs.readFileSync(require.resolve('./GUI/index.handlebars'), 'utf8'));
|
||||
app.get('/', can('access'), function(req, res, next) {
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.send(template({
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
"fs-ext": ">= 0.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rimraf": ">= 2.2.5",
|
||||
"eslint": ">= 0.4.2",
|
||||
"mocha": ">= 1.17.0",
|
||||
"eslint": ">= 0.4.2"
|
||||
"rimraf": ">= 2.2.5"
|
||||
},
|
||||
"keywords": [
|
||||
"private",
|
||||
|
|
Loading…
Add table
Reference in a new issue