Skip to content

Commit

Permalink
fix: remove args from docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
orig committed Sep 15, 2023
1 parent 7129c65 commit 0d2a522
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 31 deletions.
5 changes: 4 additions & 1 deletion apps/backend/src/novu/novu.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export class NovuService {
}

async sendVerificationEmail(user: UserContext) {
const domain = process.env.NODE_ENV === 'production' ? `https://${this.config.front.domain}` : `http://${this.config.front.domain}:${this.config.general.frontendPort}`;
const domain =
process.env.NODE_ENV === 'production'
? `https://${this.config.front.domain}`
: `http://${this.config.front.domain}:${this.config.general.frontendPort}`;
const verificationUrl = `${this.appConfigService.getConfig().front.domain}/register/verify/${user.verificationToken}`;

await this.novu.trigger('new-user', {
Expand Down
31 changes: 19 additions & 12 deletions apps/frontend/src/components/shortener-input/handleShortener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,28 @@ export const handleShortener = async (store: Store) => {

store.loading = true;

const response = await getShortenUrl(urlInput, ttl);
try {
const response = await getShortenUrl(urlInput, ttl);

store.loading = false;
store.showResult = true;
store.showResult = true;

if (!response.newUrl) {
store.urlError = 'Invalid url...';
return;
}
if (!response.newUrl) {
store.urlError = 'Invalid url...';
return;
}

const newUrl = response.newUrl;
const newUrl = response.newUrl;

store.inputValue = '';
store.reducedUrl = window.location.href.split('#')[0] + newUrl;
store.inputValue = '';
store.reducedUrl = window.location.href.split('#')[0] + newUrl;

copyToClipboard(store.reducedUrl);
confettiAnimate();
copyToClipboard(store.reducedUrl);
confettiAnimate();
} catch (error) {
store.urlError = 'An error occurred while shortening the URL. Please try again.';
console.error('Error:', error);
} finally {
store.inputValue = '';
store.loading = false;
}
};
4 changes: 0 additions & 4 deletions docker/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ services:
build:
context: ../..
dockerfile: apps/frontend/Dockerfile
args:
- DOMAIN=${DOMAIN}
- API_DOMAIN=${API_DOMAIN}
- CLIENTSIDE_API_DOMAIN=${CLIENTSIDE_API_DOMAIN}
restart: always
ports:
- '5000:5000'
Expand Down
16 changes: 4 additions & 12 deletions libs/config/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"targets": {
"build": {
"executor": "@nx/js:tsc",
"outputs": [
"{options.outputPath}"
],
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/libs/config",
"tsConfig": "libs/config/tsconfig.lib.json",
Expand All @@ -18,20 +16,14 @@
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": [
"{options.outputFile}"
],
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"libs/config/**/*.ts"
]
"lintFilePatterns": ["libs/config/**/*.ts"]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/config/jest.config.ts",
"passWithNoTests": true
Expand Down
1 change: 0 additions & 1 deletion libs/config/src/lib/config.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ describe('AppConfigService', () => {
expect(service).toBeDefined();
});


it('should return the correct configuration object', () => {
const expectedConfig = {
key1: 'value1',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@
"zod": "^3.22.2"
}
}

0 comments on commit 0d2a522

Please sign in to comment.