Skip to content

Commit

Permalink
Folder restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
crodriguez6497 committed May 23, 2024
1 parent 9cb5401 commit f9030db
Show file tree
Hide file tree
Showing 195 changed files with 63 additions and 114 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules/
/.vs
.nx
.angular
.vscode
.vscode
.gitignore
4 changes: 2 additions & 2 deletions Api/.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CPAT_CLIENT_ID="c-pat"
CPAT_CLIENT_OIDC_PROVIDER="http://localhost:2020/realms/RMFTools"
CPAT_CLIENT_API_BASE="api"
CPAT_CLIENT_DISABLED="false"
CPAT_CLIENT_DIRECTORY="../Front End/poam-app/dist"
CPAT_CLIENT_DIRECTORY="../../../client/dist
CPAT_CLIENT_EXTRA_SCOPES=""
CPAT_CLIENT_SCOPE_PREFIX=""
CPAT_CLIENT_REFRESH_DISABLED="false"
Expand Down Expand Up @@ -69,5 +69,5 @@ CPAT_JWT_EMAIL_CLAIM="email"
CPAT_LOG_LEVEL="3"
CPAT_LOG_MODE="combined"

#JWT secret key, referenced in Api/utils/token-generator.js
#JWT secret key, referenced in api/utils/token-generator.js
JWT_SECRET_KEY="wpm_token"
14 changes: 0 additions & 14 deletions Api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const swaggerUi = require('swagger-ui-express');
const jsyaml = require('js-yaml');
const fs = require('fs');
const writer = require('./utils/writer.js');
var RateLimit = require('express-rate-limit');
const { middleware: openApiMiddleware, resolvers } = require('express-openapi-validator');

const eovPath = path.dirname(require.resolve('express-openapi-validator'))
Expand All @@ -48,15 +47,6 @@ process.on('unhandledRejection', (reason, promise) => {
})

const app = express();


const limiter = RateLimit({
windowMs: 10 * 60 * 1000,
max: 100,
message: 'Too many requests from this IP, please try again after 15 minutes'
});

app.use(limiter);
app.use(express.urlencoded({ extended: true }))
app.use(express.json({
strict: false,
Expand Down Expand Up @@ -219,10 +209,6 @@ const CPAT = {
}
}

app.get('*', limiter, (req, res) => {
res.sendFile(path.join(__dirname, config.client.directory, 'index.html'));
});

async function startServer(app) {
let db = require(`./Services/mysql/utils`)
try {
Expand Down
8 changes: 4 additions & 4 deletions Api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {
"async-retry": "^1.3.3",
"axios": "^1.7.1",
"axios": "^1.7.2",
"compression": "^1.7.4",
"cors": "^2.8.5",
"date-fns": "^3.6.0",
Expand Down
2 changes: 1 addition & 1 deletion Api/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let config = {
authority: process.env.CPAT_CLIENT_OIDC_PROVIDER || process.env.CPAT_OIDC_PROVIDER || "http://localhost:2020/auth/realms/RMFTools",
apiBase: process.env.CPAT_CLIENT_API_BASE || "api",
disabled: process.env.CPAT_CLIENT_DISABLED === "true",
directory: process.env.CPAT_CLIENT_DIRECTORY || '../Front End/poam-app/dist',
directory: process.env.CPAT_CLIENT_DIRECTORY || '../../../client/dist',
extraScopes: process.env.CPAT_CLIENT_EXTRA_SCOPES,
scopePrefix: process.env.CPAT_CLIENT_SCOPE_PREFIX,
refreshToken: {
Expand Down
Empty file removed Front End/.gitkeep
Empty file.
6 changes: 0 additions & 6 deletions Front End/package-lock.json

This file was deleted.

42 changes: 0 additions & 42 deletions Front End/poam-app/.gitignore

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file removed Front End/poam-app/.nx/cache/nx_files.nxt
Binary file not shown.
Empty file.
5 changes: 5 additions & 0 deletions api/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore everything in this directory
*

# Except this file
!.gitignore
5 changes: 5 additions & 0 deletions api/dist/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore everything in this directory
*

# Except this file
!.gitignore
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
84 changes: 42 additions & 42 deletions Front End/poam-app/package-lock.json → client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Front End/poam-app/package.json → client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
"@popperjs/core": "^2.11.8",
"@swimlane/ngx-charts": "^20.5.0",
"@syncfusion/ej2-angular-treegrid": "^25.2.4",
"@syncfusion/ej2-angular-treegrid": "^25.2.5",
"angular-auth-oidc-client": "^17.0.0",
"angular2-smart-table": "^3.2.0",
"bootstrap": "^5.3.3",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f9030db

Please sign in to comment.