default router index file moved to config;
This commit is contained in:
1 parent
a67b3244ef
commit
385cecfc97
2 files changed
+3
-1
No files matched your search
@@ -10,6 +10,7 @@ var privateFile = process.env["PRIVATE"] || "private.json";
|
||||
var privateData = JSON.parse(fs.readFileSync(privateFile, "utf-8"));
|
||||
|
||||
var config = {
|
||||
defaultIndex: "/templates/index.html" || process.env["INDEX"],
|
||||
port: process.env["PORT"] || 3000,
|
||||
pub: "./",
|
||||
data: {
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@
|
||||
|
||||
var path = require("path");
|
||||
var fs = require("mz/fs");
|
||||
var config = require("../config");
|
||||
|
||||
function accepts(routes, def) {
|
||||
return function *() {
|
||||
@@ -26,7 +27,7 @@ function accepts(routes, def) {
|
||||
|
||||
function index(filename) {
|
||||
if (!filename){
|
||||
filename = path.join(__dirname, "../templates/index.html");
|
||||
filename = path.join(__dirname, "..", config.defaultIndex);
|
||||
}
|
||||
|
||||
return function *() {
|
||||
|
||||
Reference in new issue
Block a user