feat: add domain to setup process

This commit is contained in:
Pitu 2021-06-18 01:45:10 +09:00
parent d4390cce40
commit f42c75c7f4
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,7 @@ class Util {
static getEnvironmentDefaults() {
return {
domain: process.env.DOMAIN,
routePrefix: process.env.ROUTE_PREFIX || '/api',
rateLimitWindow: process.env.RATE_LIMIT_WINDOW || 2,
rateLimitMax: process.env.RATE_LIMIT_MAX || 5,

View File

@ -13,6 +13,11 @@ async function start() {
console.log();
const wizard = [
{
type: 'input',
query: 'Full domain this instance is gonna be running on (Ex: https://my-super-chibisafe.xyz):',
handle: 'DOMAIN'
},
{
type: 'input',
query: 'Port to run chibisafe in? (default: 5000)',
@ -55,6 +60,7 @@ async function start() {
let envfile = '';
const defaultSettings = {
DOMAIN: response.DOMAIN,
SERVER_PORT: response.SERVER_PORT || 5000,
DB_CLIENT: response.DB_CLIENT,
DB_HOST: response.DB_HOST || null,