sails.js的标题或应用程序名称(使用node.js和express.js)在哪里? [英] Where is title or app name for sails.js (using node.js and express.js)?
本文介绍了sails.js的标题或应用程序名称(使用node.js和express.js)在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试更改我的网站名称。
找不到我可以设置标题或应用程序名称的位置。
I'm trying to change my websites name. Can't find where I can set title or app name.
推荐答案
您可以在 config /
目录,例如 config / app.js
,其中包含如下所示的消息:
You can create any file in config/
directory, for example config/app.js
which contains comething like this:
module.exports = {
appName : 'My App'
};
导出对象的任何属性都成为Sails`配置的一个选项。
Any property of exported object become an option of Sails` config.
appName
属性用作应用程序标题。例如,在默认布局中:
appName
property is used as application title. For example, in default layout:
<title><%- title %></title>
其中标题
=== sails.config.appName
=== '我的应用'
where title
=== sails.config.appName
=== 'My App'
默认情况下, appName
配置变量设置为Sails。
By default appName
config variable is set to 'Sails'.
这篇关于sails.js的标题或应用程序名称(使用node.js和express.js)在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文