fix nodemon

This commit is contained in:
Simon Larsen 2023-09-13 13:07:29 +05:30
parent 35d7f0ee59
commit a0895b222e
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
8 changed files with 9 additions and 11 deletions

View File

@ -1,4 +1,4 @@
{
"watch": ["webpack.config.js"],
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development"
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development"
}

View File

@ -1,4 +1,4 @@
{
"watch": ["webpack.config.js"],
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development"
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development"
}

View File

@ -42,7 +42,7 @@ export default class ProbeAPI extends BaseAPI<Probe, ProbeServiceType> {
res,
{
'HOST': globalConfig?.host?.toString() || 'localhost',
'USE_HTTPS': globalConfig?.useHttps || false
'USE_HTTPS': globalConfig?.useHttps?.toString() || "false"
},
);

View File

@ -30,7 +30,7 @@ export const env: Function = (key: string): string => {
};
export const HTTP_PROTOCOL: Protocol =
env('USE_HTTPS') === true ? Protocol.HTTP : Protocol.HTTPS;
env('USE_HTTPS') === "true" ? Protocol.HTTPS : Protocol.HTTP;
export const HOST: string = env('HOST') || '';

View File

@ -1,4 +1,4 @@
{
"watch": ["webpack.config.js"],
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3009 --mode=development"
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3009 --mode=development"
}

View File

@ -7,15 +7,13 @@ const readEnvFile = (pathToFile) => {
const parsed = dotenv.config({ path: pathToFile }).parsed;
const env = {};
const env = {
};
for (const key in parsed) {
env[key] = JSON.stringify(parsed[key]);
}
env['HOST'] = 'localhost' // use localhost for dev.
env['USE_HTTPS'] = true;
return env;
}

View File

@ -19,7 +19,7 @@ import BillingInvoiceAPI from 'CommonServer/API/BillingInvoiceAPI';
import ProjectAPI from 'CommonServer/API/ProjectAPI';
import GlobalConfigAPI from 'CommonServer/API/GlobalConfig';
import GlobalConfigAPI from 'CommonServer/API/GlobalConfigAPI';
import ShortLink from 'Model/Models/ShortLink';
import ShortLinkService, {

View File

@ -1,4 +1,4 @@
{
"watch": ["webpack.config.js"],
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && webpack-dev-server --port=3105 --mode=development"
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3105 --mode=development"
}