Skip to content

Commit

Permalink
cleaned up API_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
dpigera committed Jan 10, 2025
1 parent a26e33b commit 9a8da2f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
36 changes: 23 additions & 13 deletions app/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
'use strict';

module.exports = function (environment) {
let ENV = {
modulePrefix: 'your-app-name',
const ENV = {
modulePrefix: 'player-basic',
environment,
rootURL: '/',
locationType: 'history',

pocketbase: {
url: environment === 'production'
? 'https://gauntlet-chatgenius-pocketbase-2.fly.dev'
: 'http://127.0.0.1:8090'
EmberENV: {
EXTEND_PROTOTYPES: false,
FEATURES: {
},
},

APP: {
},

// ... other config
};

if (environment === 'development') {
ENV.APP.API_HOST = 'http://127.0.0.1:8090';
}

if (environment === 'test') {
ENV.locationType = 'none';
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;
ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
}

if (environment === 'production') {
// Add any production-specific settings
ENV.rootURL = '/';
ENV.locationType = 'history';
ENV.APP.API_HOST = 'https://gauntlet-chatgenius-pocketbase-2.fly.dev';
}

return ENV;
};
};
2 changes: 1 addition & 1 deletion app/services/pocketbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class PocketbaseService extends Service {

constructor() {
super(...arguments);
this.client = new PocketBase(config.pocketbase.url);
this.client = new PocketBase(config.APP.API_HOST);
}

get name() {
Expand Down

0 comments on commit 9a8da2f

Please sign in to comment.