-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit: initial code for DynamicComponentRenderer
commit: GQL to be consumed in Spring Boot Thymeleaf commit: Fix for 413 Payload too large in server side code commit: Added GET_RESUME gql and used in ResumePreview on Refresh button commit: Fine-tune queries for ResumePreview commit: Resume Preview functionality initial changes commit: DynamicDataRenderer: fix for rendering Array data. Earlier the fields of each object within the array are displayed on the same line commit: DynamicDataRenderer integrated in Details, Input and Modal components commit: my first successful k8s deployment Custom collapse integration in frontend projects commit: ChatGpt renderer commit: withCollapse implemented in views component commit: withCollapse HOC and small fix in CompanyModal propTypes Added utility method handleDownloadJSON to download all resumes commit: Code adjustments for HTMLDataViewer incorporation in codebase commit code for application consuming GQL endpoints with EJS pages
- Loading branch information
1 parent
9857d17
commit 81f4518
Showing
344 changed files
with
323,633 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Compiled class file | ||
*.class | ||
.vscode | ||
|
||
# Log file | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
# microservices-playground | ||
# microservices-playground | ||
In this repo, I wish to create different microservices test projects. create docker images and orchestrate using K8s. | ||
|
||
|
||
# References | ||
- https://minikube.sigs.k8s.io/docs/start/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Example base 01 | ||
It contains folder structure as follows | ||
``` | ||
example-base-01 ==base folder | ||
|- backend = root for all backend services | ||
|- frontend = root for frontend project. In this example we have single frontend project. It communicates with microservices, | ||
|- nginx.conf = | ||
``` | ||
|
||
# docker compose with custom yml file | ||
## to build | ||
``` | ||
docker-compose -f docker-compose-with-networks.yml build --no-cache | ||
``` | ||
## to up | ||
``` | ||
docker-compose -f docker-compose-with-networks.yml up | ||
``` | ||
|
||
# Frontend development | ||
## To initialize a React.js project directly inside the "frontend" folder without creating any subfolders | ||
``` | ||
npx create-react-app . | ||
``` | ||
|
||
This command will initialize a new React.js project directly in the "frontend" folder without creating any subfolders. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
# npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FRONTEND_SERVICE_URL= http://localhost:3002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Use an official Node runtime as the base image | ||
FROM node:lts-buster-slim AS development | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install --force | ||
|
||
# Copy the entire project to the working directory | ||
COPY . . | ||
|
||
# Expose port 3000 to the outside world | ||
EXPOSE 3000 | ||
|
||
# Command to run the application | ||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "topic", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "nodemon src/server.js" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"ejs": "^3.1.10", | ||
"express": "^4.19.2", | ||
"bcrypt": "^5.1.1", | ||
"body-parser": "^1.20.2", | ||
"cors": "^2.8.5", | ||
"jsonwebtoken": "^9.0.2", | ||
"mongoose": "^7.6.5", | ||
"mysql": "^2.18.1", | ||
"swagger-jsdoc": "^6.2.8", | ||
"swagger-ui-express": "^5.0.0", | ||
"uuid": "^9.0.1" | ||
}, | ||
"devDependencies": { | ||
"nodemon": "^3.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const express = require('express'); | ||
const app = express(); | ||
const port = 3000; // You can change this if needed | ||
const path = require('path'); | ||
|
||
// Set the view engine to EJS | ||
app.set('view engine', 'ejs'); | ||
// Set the directory for views | ||
app.set('views', path.join(__dirname, 'views')); | ||
|
||
// Define the frontend service URL | ||
const frontendServiceUrl = process.env.FRONTEND_SERVICE_URL || 'http://localhost:3002'; | ||
|
||
// Middleware to set CORS headers | ||
app.use((req, res, next) => { | ||
// Allow requests from frontend service origin | ||
res.setHeader('Access-Control-Allow-Origin', frontendServiceUrl); // Externalized URL | ||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE'); // Allow specific HTTP methods | ||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization'); // Allow specific headers | ||
next(); | ||
}); | ||
|
||
// Define your routes | ||
app.get('/', (req, res) => { | ||
console.log(`process.env.FRONTEND_SERVICE_URL : ${process.env.FRONTEND_SERVICE_URL}`); | ||
res.render('index', {frontendServiceUrl:process.env.FRONTEND_SERVICE_URL}); | ||
}); | ||
|
||
app.get('/topics', (req, res) => { | ||
console.log(`process.env.FRONTEND_SERVICE_URL : ${process.env.FRONTEND_SERVICE_URL}`); | ||
const topics = ['Node.js', 'Express', 'JavaScript', 'EJS']; | ||
res.json({ topics }); | ||
}); | ||
|
||
// Start the server | ||
app.listen(port, () => { | ||
console.log(`Topics Server is running on http://localhost:${port}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Welcome</title> | ||
</head> | ||
<body> | ||
<h1>Welcome to Topics microservice</h1> | ||
<h2><%= frontendServiceUrl %></h2> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
# npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FRONTEND_SERVICE_URL= http://localhost:3002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Use an official Node runtime as the base image | ||
FROM node:lts-buster-slim AS development | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install dependencies | ||
RUN npm install --force | ||
|
||
# Copy the entire project to the working directory | ||
COPY . . | ||
|
||
# Expose port 3000 to the outside world | ||
EXPOSE 3000 | ||
|
||
# Command to run the application | ||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "word", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "nodemon src/server.js" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"ejs": "^3.1.10", | ||
"express": "^4.19.2", | ||
"bcrypt": "^5.1.1", | ||
"body-parser": "^1.20.2", | ||
"cors": "^2.8.5", | ||
"jsonwebtoken": "^9.0.2", | ||
"mongoose": "^7.6.5", | ||
"mysql": "^2.18.1", | ||
"swagger-jsdoc": "^6.2.8", | ||
"swagger-ui-express": "^5.0.0", | ||
"uuid": "^9.0.1" | ||
}, | ||
"devDependencies": { | ||
"nodemon": "^3.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const express = require('express'); | ||
const app = express(); | ||
const port = 3001; // You can change this if needed | ||
const path = require('path'); | ||
|
||
// Set the view engine to EJS | ||
app.set('view engine', 'ejs'); | ||
// Set the directory for views | ||
app.set('views', path.join(__dirname, 'views')); | ||
|
||
// Define the frontend service URL | ||
const frontendServiceUrl = process.env.FRONTEND_SERVICE_URL || 'http://localhost:3002'; | ||
|
||
// Middleware to set CORS headers | ||
app.use((req, res, next) => { | ||
// Allow requests from frontend service origin | ||
res.setHeader('Access-Control-Allow-Origin', frontendServiceUrl); // Externalized URL | ||
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE'); // Allow specific HTTP methods | ||
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization'); // Allow specific headers | ||
next(); | ||
}); | ||
|
||
// Define your routes | ||
app.get('/', (req, res) => { | ||
console.log(`process.env.FRONTEND_SERVICE_URL : ${process.env.FRONTEND_SERVICE_URL}`); | ||
res.render('index', {frontendServiceUrl:process.env.FRONTEND_SERVICE_URL}); | ||
}); | ||
|
||
app.get('/words', (req, res) => { | ||
console.log(`process.env.FRONTEND_SERVICE_URL : ${process.env.FRONTEND_SERVICE_URL}`); | ||
const words = ['Apple', 'Banana', 'Car', 'Donkey']; | ||
res.json({ words }); | ||
}); | ||
|
||
// Start the server | ||
app.listen(port, () => { | ||
console.log(`Words Server is running on http://localhost:${port}`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Welcome</title> | ||
</head> | ||
<body> | ||
<h1>Welcome to Words microservice</h1> | ||
|
||
<h2><%= frontendServiceUrl %></h2> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: '3' | ||
|
||
services: | ||
nginx: | ||
image: nginx:latest | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
depends_on: | ||
- topics | ||
- words | ||
|
||
topics: | ||
build: ./backend/topic | ||
ports: | ||
- "3000:3000" | ||
|
||
words: | ||
build: ./backend/word | ||
ports: | ||
- "3001:3001" | ||
|
||
frontend: | ||
build: ./frontend | ||
ports: | ||
- "3002:3002" | ||
environment: | ||
- PORT= 3002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: '3' | ||
|
||
services: | ||
nginx: | ||
image: nginx:latest | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./nginx.conf:/etc/nginx/nginx.conf | ||
networks: | ||
- my_network | ||
depends_on: | ||
- topics | ||
- words | ||
|
||
topics: | ||
build: ./backend/topic | ||
networks: | ||
- my_network | ||
|
||
words: | ||
build: ./backend/word | ||
networks: | ||
- my_network | ||
|
||
frontend: | ||
build: ./frontend | ||
ports: | ||
- "3002:3002" | ||
environment: | ||
- PORT= 3002 | ||
networks: | ||
- my_network | ||
|
||
networks: | ||
my_network: | ||
driver: bridge |
Oops, something went wrong.