From be8875c9b67a09dd84a397847d7cb092aecfdf9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Drouet?= Date: Tue, 12 May 2020 15:05:18 +0200 Subject: [PATCH] react-express-mongodb: rename server to backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The goal here is to keep the same structure than the other examples. Also, considering that it has a "frontend" folder, the equivalent for the server should be "backend". Signed-off-by: Jérémie Drouet --- .../{server => backend}/Dockerfile | 0 react-express-mongodb/{server => backend}/README.md | 0 .../{server => backend}/config/config.js | 0 .../{server => backend}/config/config.json | 0 .../{server => backend}/config/messages.js | 0 .../{server => backend}/db/index.js | 0 .../{server => backend}/logs/project.log | Bin .../{server => backend}/models/todos/todo.model.js | 0 .../{server => backend}/package-lock.json | 0 .../{server => backend}/package.json | 0 .../{server => backend}/routes/index.js | 0 react-express-mongodb/{server => backend}/server.js | 0 .../{server => backend}/utils/helpers/logger.js | 0 .../utils/helpers/server.responses.js | 0 react-express-mongodb/docker-compose.yml | 12 ++++++------ react-express-mongodb/frontend/package.json | 4 ++-- 16 files changed, 8 insertions(+), 8 deletions(-) rename react-express-mongodb/{server => backend}/Dockerfile (100%) rename react-express-mongodb/{server => backend}/README.md (100%) rename react-express-mongodb/{server => backend}/config/config.js (100%) rename react-express-mongodb/{server => backend}/config/config.json (100%) rename react-express-mongodb/{server => backend}/config/messages.js (100%) rename react-express-mongodb/{server => backend}/db/index.js (100%) rename react-express-mongodb/{server => backend}/logs/project.log (100%) rename react-express-mongodb/{server => backend}/models/todos/todo.model.js (100%) rename react-express-mongodb/{server => backend}/package-lock.json (100%) rename react-express-mongodb/{server => backend}/package.json (100%) rename react-express-mongodb/{server => backend}/routes/index.js (100%) rename react-express-mongodb/{server => backend}/server.js (100%) rename react-express-mongodb/{server => backend}/utils/helpers/logger.js (100%) rename react-express-mongodb/{server => backend}/utils/helpers/server.responses.js (100%) diff --git a/react-express-mongodb/server/Dockerfile b/react-express-mongodb/backend/Dockerfile similarity index 100% rename from react-express-mongodb/server/Dockerfile rename to react-express-mongodb/backend/Dockerfile diff --git a/react-express-mongodb/server/README.md b/react-express-mongodb/backend/README.md similarity index 100% rename from react-express-mongodb/server/README.md rename to react-express-mongodb/backend/README.md diff --git a/react-express-mongodb/server/config/config.js b/react-express-mongodb/backend/config/config.js similarity index 100% rename from react-express-mongodb/server/config/config.js rename to react-express-mongodb/backend/config/config.js diff --git a/react-express-mongodb/server/config/config.json b/react-express-mongodb/backend/config/config.json similarity index 100% rename from react-express-mongodb/server/config/config.json rename to react-express-mongodb/backend/config/config.json diff --git a/react-express-mongodb/server/config/messages.js b/react-express-mongodb/backend/config/messages.js similarity index 100% rename from react-express-mongodb/server/config/messages.js rename to react-express-mongodb/backend/config/messages.js diff --git a/react-express-mongodb/server/db/index.js b/react-express-mongodb/backend/db/index.js similarity index 100% rename from react-express-mongodb/server/db/index.js rename to react-express-mongodb/backend/db/index.js diff --git a/react-express-mongodb/server/logs/project.log b/react-express-mongodb/backend/logs/project.log similarity index 100% rename from react-express-mongodb/server/logs/project.log rename to react-express-mongodb/backend/logs/project.log diff --git a/react-express-mongodb/server/models/todos/todo.model.js b/react-express-mongodb/backend/models/todos/todo.model.js similarity index 100% rename from react-express-mongodb/server/models/todos/todo.model.js rename to react-express-mongodb/backend/models/todos/todo.model.js diff --git a/react-express-mongodb/server/package-lock.json b/react-express-mongodb/backend/package-lock.json similarity index 100% rename from react-express-mongodb/server/package-lock.json rename to react-express-mongodb/backend/package-lock.json diff --git a/react-express-mongodb/server/package.json b/react-express-mongodb/backend/package.json similarity index 100% rename from react-express-mongodb/server/package.json rename to react-express-mongodb/backend/package.json diff --git a/react-express-mongodb/server/routes/index.js b/react-express-mongodb/backend/routes/index.js similarity index 100% rename from react-express-mongodb/server/routes/index.js rename to react-express-mongodb/backend/routes/index.js diff --git a/react-express-mongodb/server/server.js b/react-express-mongodb/backend/server.js similarity index 100% rename from react-express-mongodb/server/server.js rename to react-express-mongodb/backend/server.js diff --git a/react-express-mongodb/server/utils/helpers/logger.js b/react-express-mongodb/backend/utils/helpers/logger.js similarity index 100% rename from react-express-mongodb/server/utils/helpers/logger.js rename to react-express-mongodb/backend/utils/helpers/logger.js diff --git a/react-express-mongodb/server/utils/helpers/server.responses.js b/react-express-mongodb/backend/utils/helpers/server.responses.js similarity index 100% rename from react-express-mongodb/server/utils/helpers/server.responses.js rename to react-express-mongodb/backend/utils/helpers/server.responses.js diff --git a/react-express-mongodb/docker-compose.yml b/react-express-mongodb/docker-compose.yml index be4e982..e505be6 100644 --- a/react-express-mongodb/docker-compose.yml +++ b/react-express-mongodb/docker-compose.yml @@ -16,16 +16,17 @@ services: networks: - react-express depends_on: - - server - server: - container_name: server + - backend + + backend: + container_name: backend restart: always build: - context: server + context: backend args: NODE_PORT: 3000 volumes: - - ./server:/usr/src/app + - ./backend:/usr/src/app - /usr/src/app/node_modules depends_on: - mongo @@ -44,4 +45,3 @@ services: networks: react-express: express-mongo: - diff --git a/react-express-mongodb/frontend/package.json b/react-express-mongodb/frontend/package.json index 62b30b6..01b256c 100644 --- a/react-express-mongodb/frontend/package.json +++ b/react-express-mongodb/frontend/package.json @@ -17,7 +17,7 @@ "fsevents": "^2.1.2" }, "scripts": { - "start": "PORT=5000 react-scripts start", + "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" @@ -25,7 +25,7 @@ "eslintConfig": { "extends": "react-app" }, - "proxy": "http://server:3000", + "proxy": "http://backend:3000", "browserslist": { "production": [ ">0.2%",