This commit is contained in:
Westly Wright
2018-07-03 12:29:41 -07:00
parent a9ffdf4dae
commit 4f838f6973
2 changed files with 4 additions and 20 deletions
+2 -1
View File
@@ -7,7 +7,8 @@ const {
const md5 = require('md5');
const atomicalgolia = require("atomic-algolia");
const fs = require('fs');
const indexName = "dev_docs"
const isProduction = process.env.NODE_ENV === 'production';
const indexName = isProduction ? "prod_docs" : "dev_docs";
const nue = [];
const rawdata = fs.readFileSync('public/algolia.json');
const nodes = JSON.parse(rawdata);