mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 01:22:44 +00:00
Move process.chdir up so it occurs before config.js is ever called.
app.js should be required before config to make sure process.cwd is updated first
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
||||||
|
// Set working directory to project root
|
||||||
|
process.chdir(`${__dirname}/..`);
|
||||||
|
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const jwt = require('jwt-simple');
|
const jwt = require('jwt-simple');
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
@@ -14,9 +17,6 @@ const asyncHandler = require('express-async-handler');
|
|||||||
|
|
||||||
const brewAccessTypes = ['edit', 'share', 'raw'];
|
const brewAccessTypes = ['edit', 'share', 'raw'];
|
||||||
|
|
||||||
// Set working directory to project root
|
|
||||||
process.chdir(`${__dirname}/..`);
|
|
||||||
|
|
||||||
//Get the brew object from the HB database or Google Drive
|
//Get the brew object from the HB database or Google Drive
|
||||||
const getBrewFromId = asyncHandler(async (id, accessType)=>{
|
const getBrewFromId = asyncHandler(async (id, accessType)=>{
|
||||||
if(!brewAccessTypes.includes(accessType))
|
if(!brewAccessTypes.includes(accessType))
|
||||||
|
|||||||
Reference in New Issue
Block a user