Print the package name on the index

This commit is contained in:
Petr Sloup
2016-08-06 18:40:50 +08:00
parent 8a7f44d4c2
commit 2ab9d9e168
2 changed files with 3 additions and 3 deletions

View File

@@ -81,7 +81,7 @@
<footer> <footer>
<a href="https://www.klokantech.com/" target="_blank"><img src="/images/klokantech.png" /></a> <a href="https://www.klokantech.com/" target="_blank"><img src="/images/klokantech.png" /></a>
<p> <p>
<a href="https://github.com/klokantech/tileserver-gl" target="_blank">Powered by TileServer-GL v{{server_version}}</a> <a href="https://www.klokantech.com/" target="_blank">open-source project from Klokan Technologies GmbH.</a> <a href="https://github.com/klokantech/tileserver-gl" target="_blank">Powered by TileServer-GL ({{server_version}})</a> <a href="https://www.klokantech.com/" target="_blank">open-source project from Klokan Technologies GmbH.</a>
</p> </p>
</footer> </footer>
</body> </body>

View File

@@ -28,7 +28,7 @@ if (packageJson.name.slice(-6) !== '-light') {
} }
module.exports = function(opts, callback) { module.exports = function(opts, callback) {
console.log('Starting TileServer-GL v' + packageJson.version); console.log('Starting ' + packageJson.name + ' v' + packageJson.version);
var app = express().disable('x-powered-by'), var app = express().disable('x-powered-by'),
serving = { serving = {
@@ -185,7 +185,7 @@ module.exports = function(opts, callback) {
return res.status(404).send('Not found'); return res.status(404).send('Not found');
} }
} }
data['server_version'] = packageJson.version; data['server_version'] = packageJson.name + ' v' + packageJson.version;
data['key_query_part'] = data['key_query_part'] =
req.query.key ? 'key=' + req.query.key + '&amp;' : ''; req.query.key ? 'key=' + req.query.key + '&amp;' : '';
data['key_query'] = req.query.key ? '?key=' + req.query.key : ''; data['key_query'] = req.query.key ? '?key=' + req.query.key : '';