From 022533ceb626a96f795ef90af65c1bc2e24f6f38 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Tue, 30 Jun 2020 04:06:44 +0000 Subject: [PATCH] Add vscode settings for code server Signed-off-by: William Brawner --- .vscode/launch.json | 32 ++++------------------ .vscode/settings.json | 12 ++++++++ angular.json | 11 ++++++++ captain-definition | 4 +-- package.json | 2 +- src/environments/environment.codeserver.ts | 4 +++ 6 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 src/environments/environment.codeserver.ts diff --git a/.vscode/launch.json b/.vscode/launch.json index 5a476e3..174a9da 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,34 +4,14 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - { - "name": "Launch index.html", - "type": "firefox", + "name": "ng serve", + "type": "node", "request": "launch", - "reAttach": true, - "file": "${workspaceFolder}/index.html" - }, - { - "name": "Launch localhost", - "type": "firefox", - "request": "launch", - "reAttach": true, - "url": "http://localhost/index.html", - "webRoot": "${workspaceFolder}" - }, - { - "name": "Attach", - "type": "firefox", - "request": "attach" - }, - { - "name": "Launch addon", - "type": "firefox", - "request": "launch", - "reAttach": true, - "addonType": "webExtension", - "addonPath": "${workspaceFolder}" + "runtimeExecutable": "${workspaceFolder}/node_modules/@angular/cli/bin/ng", + "runtimeArgs": [ + "serve" + ] } ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c8e5bbf --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +{ + "database.connections": [ + { + "type": "mysql", + "name": "root@captain.intra.wbrawner.com (MySql)", + "host": "captain.intra.wbrawner.com:3306", + "username": "root", + "database": null, + "password": "U7YE8YsmES8LHB2B39WXNjTQk4d48LzQEZG3cj6wSb2fgeRLEYtrrqTwiqAhrpR3" + } + ] +} \ No newline at end of file diff --git a/angular.json b/angular.json index 72a6897..0500266 100644 --- a/angular.json +++ b/angular.json @@ -51,6 +51,14 @@ "vendorChunk": false, "buildOptimizer": true, "serviceWorker": true + }, + "codeserver": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.codeserver.ts" + } + ] } } }, @@ -62,6 +70,9 @@ "configurations": { "production": { "browserTarget": "twigs:build:production" + }, + "codeserver": { + "browserTarget": "twigs:build:codeserver" } } }, diff --git a/captain-definition b/captain-definition index 17db556..0e14f82 100644 --- a/captain-definition +++ b/captain-definition @@ -1,4 +1,4 @@ - { +{ "schemaVersion": 2, "dockerfilePath": "./Dockerfile" - } +} diff --git a/package.json b/package.json index 478a51f..1db4e4d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "ng": "node_modules/@angular/cli/bin/ng", "start": "node_modules/@angular/cli/bin/ng serve --host '0.0.0.0'", - "code-server": "node_modules/@angular/cli/bin/ng serve --host \"0.0.0.0\" --disable-host-check --base-href /angular/", + "code-server": "node_modules/@angular/cli/bin/ng serve --configuration=codeserver --host \"0.0.0.0\" --disable-host-check --poll=2000", "build": "node_modules/@angular/cli/bin/ng build", "package": "node_modules/@angular/cli/bin/ng build --prod --service-worker", "publish": "node_modules/@angular/cli/bin/ng build --prod --service-worker && firebase deploy", diff --git a/src/environments/environment.codeserver.ts b/src/environments/environment.codeserver.ts new file mode 100644 index 0000000..855d541 --- /dev/null +++ b/src/environments/environment.codeserver.ts @@ -0,0 +1,4 @@ +export const environment = { + production: false, + apiUrl: 'https://3000code.brawner.home' +};