From 366e48757e63a7bb7510de9c81704a113ad50b98 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sun, 28 Nov 2021 21:24:51 +0100 Subject: [PATCH] back/config: replace localhost with 127.0.0.1 --- config/default.json5 | 6 +++--- config/test.json5 | 2 +- jest.config.js | 1 - package.json | 2 +- src/components/ExpressAppComponent.ts | 2 +- test/_mail_server.ts | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/config/default.json5 b/config/default.json5 index 52dbd6f..b853789 100644 --- a/config/default.json5 +++ b/config/default.json5 @@ -4,8 +4,8 @@ app: { listen_addr: '127.0.0.1', port: 4899, - public_url: "http://localhost:4899", - public_websocket_url: "ws://localhost:4899", + public_url: "http://127.0.0.1:4899", + public_websocket_url: "ws://127.0.0.1:4899", name: 'Example App', contact_email: 'contact@example.net', display_email_warning: true, @@ -36,7 +36,7 @@ }, mysql: { connectionLimit: 10, - host: "localhost", + host: "127.0.0.1", user: "root", password: "", database: "swaf", diff --git a/config/test.json5 b/config/test.json5 index 53997df..351913e 100644 --- a/config/test.json5 +++ b/config/test.json5 @@ -3,7 +3,7 @@ approval_mode: true, }, mysql: { - host: "localhost", + host: "127.0.0.1", user: "root", password: "", database: "swaf_test", diff --git a/jest.config.js b/jest.config.js index 3502ddc..4ec21d1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,6 +16,5 @@ module.exports = { '**/test/**/*.test.ts' ], testEnvironment: 'node', - testTimeout: 60000, resolver: "jest-ts-webcompat-resolver", }; diff --git a/package.json b/package.json index c812f56..f7769b7 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "compile": "yarn clean && yarn prepare-sources && tsc --build", "build": "yarn compile && node . pre-compile-views && node scripts/dist.js", "build-production": "NODE_ENV=production yarn build", - "dev": "yarn compile && concurrently -k -n \"Maildev,Typescript,ViewPreCompile,Node\" -p \"[{name}]\" -c \"yellow,blue,red,green\" \"maildev\" \"tsc --build --watch --preserveWatchOutput\" \"nodemon -i public -i intermediates -- pre-compile-views --watch\" \"nodemon -i public -i intermediates\"", + "dev": "yarn compile && concurrently -k -n \"Maildev,Typescript,ViewPreCompile,Node\" -p \"[{name}]\" -c \"yellow,blue,red,green\" \"maildev --ip 127.0.0.1\" \"tsc --build --watch --preserveWatchOutput\" \"nodemon -i public -i intermediates -- pre-compile-views --watch\" \"nodemon -i public -i intermediates\"", "lint": "eslint .", "release": "yarn build && yarn lint && yarn test && cd dist && yarn publish" }, diff --git a/src/components/ExpressAppComponent.ts b/src/components/ExpressAppComponent.ts index 6977837..96c3bcb 100644 --- a/src/components/ExpressAppComponent.ts +++ b/src/components/ExpressAppComponent.ts @@ -21,7 +21,7 @@ export default class ExpressAppComponent extends ApplicationComponent { public async start(app: Express): Promise { this.server = app.listen(this.port, this.addr, () => { - logger.info(`Web server running on http://${this.addr}:${this.port}.`); + logger.info(`Web server running on http://${this.addr}:${this.port}`); }); // Proxy diff --git a/test/_mail_server.ts b/test/_mail_server.ts index 5761401..92f282b 100644 --- a/test/_mail_server.ts +++ b/test/_mail_server.ts @@ -1,7 +1,7 @@ import MailDev, {Mail} from "maildev"; export const MAIL_SERVER = new MailDev({ - ip: 'localhost', + ip: '127.0.0.1', }); export async function setupMailServer(): Promise {