0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-14 12:52:42 +00:00

Merge branch 'master' into dependabot/npm_and_yarn/mongoose-8.3.0

This commit is contained in:
Trevor Buckner
2024-04-04 14:22:13 -04:00
committed by GitHub
3 changed files with 15 additions and 5 deletions

View File

@@ -75,7 +75,7 @@ const errorIndex = (props)=>{
**Brew Title:** ${props.brew.brewTitle || 'Unable to show title'} **Brew Title:** ${props.brew.brewTitle || 'Unable to show title'}
**Current Authors:** ${props.brew.authors?.map((author)=>{return `${author}`;}).join(', ') || 'Unable to list authors'} **Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}
[Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`, [Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`,
@@ -88,7 +88,7 @@ const errorIndex = (props)=>{
**Brew Title:** ${props.brew.brewTitle || 'Unable to show title'} **Brew Title:** ${props.brew.brewTitle || 'Unable to show title'}
**Current Authors:** ${props.brew.authors?.map((author)=>{return `${author}`;}).join(', ') || 'Unable to list authors'}`, **Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}`,
// Brew load error // Brew load error
'05' : dedent` '05' : dedent`

View File

@@ -7,6 +7,14 @@ DB.connect(config).then(()=>{
// before launching server // before launching server
const PORT = process.env.PORT || config.get('web_port') || 8000; const PORT = process.env.PORT || config.get('web_port') || 8000;
server.app.listen(PORT, ()=>{ server.app.listen(PORT, ()=>{
console.log(`server on port: ${PORT}`); const reset = '\x1b[0m'; // Reset to default style
const bright = '\x1b[1m'; // Bright (bold) style
const cyan = '\x1b[36m'; // Cyan color
const underline = '\x1b[4m'; // Underlined style
console.log(`\n\tserver started at: ${new Date().toLocaleString()}`);
console.log(`\tserver on port: ${PORT}`);
console.log(`\t${bright + cyan}Open in browser: ${reset}${underline + bright + cyan}http://localhost:${PORT}${reset}\n\n`)
}); });
}); });

View File

@@ -7,7 +7,9 @@ const config = require('./config.js');
let serviceAuth; let serviceAuth;
if(!config.get('service_account')){ if(!config.get('service_account')){
console.log('No Google Service Account in config files - Google Drive integration will not be available.'); const reset = '\x1b[0m'; // Reset to default style
const yellow = '\x1b[33m'; // yellow color
console.warn(`\n${yellow}No Google Service Account in config files - Google Drive integration will not be available.${reset}`);
} else { } else {
const keys = typeof(config.get('service_account')) == 'string' ? const keys = typeof(config.get('service_account')) == 'string' ?
JSON.parse(config.get('service_account')) : JSON.parse(config.get('service_account')) :
@@ -18,7 +20,7 @@ if(!config.get('service_account')){
serviceAuth.scopes = ['https://www.googleapis.com/auth/drive']; serviceAuth.scopes = ['https://www.googleapis.com/auth/drive'];
} catch (err) { } catch (err) {
console.warn(err); console.warn(err);
console.log('Please make sure the Google Service Account is set up properly in your config files.'); console.warn('Please make sure the Google Service Account is set up properly in your config files.');
} }
} }