tango-app-api-client 3.1.3 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +41 -0
- package/package.json +5 -5
- package/src/controllers/client.controllers.js +2 -0
package/app.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import express from 'express';
|
|
3
|
+
import { clientRouter } from './index.js';
|
|
4
|
+
|
|
5
|
+
import dotenv from 'dotenv';
|
|
6
|
+
import { logger } from 'tango-app-api-middleware';
|
|
7
|
+
import { connectdb } from './config/database/database.js';
|
|
8
|
+
import responseMiddleware from './config/response/response.js';
|
|
9
|
+
import errorMiddleware from './config/response/error.js';
|
|
10
|
+
import pkg from 'body-parser';
|
|
11
|
+
import swagger from 'swagger-ui-express';
|
|
12
|
+
import { swaggerConfig } from './config/swagger/swagger.js';
|
|
13
|
+
const { json, urlencoded } = pkg;
|
|
14
|
+
|
|
15
|
+
const env=dotenv.config();
|
|
16
|
+
|
|
17
|
+
const app = express();
|
|
18
|
+
const PORT = process.env.PORT || 3000;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
if ( env.error ) {
|
|
22
|
+
logger.error( '.env not found' );
|
|
23
|
+
process.exit( 1 );
|
|
24
|
+
}
|
|
25
|
+
app.use( json( { limit: '500mb' } ) );
|
|
26
|
+
app.use(
|
|
27
|
+
urlencoded( {
|
|
28
|
+
extended: true,
|
|
29
|
+
} ),
|
|
30
|
+
);
|
|
31
|
+
app.use( responseMiddleware );
|
|
32
|
+
app.use( errorMiddleware );
|
|
33
|
+
|
|
34
|
+
app.use( '/api-docs', swagger.serve, swagger.setup( swaggerConfig ) );
|
|
35
|
+
app.use( '/v3/client', clientRouter );
|
|
36
|
+
|
|
37
|
+
app.listen( PORT, () => {
|
|
38
|
+
logger.info( `server is running on port= ${PORT} ` );
|
|
39
|
+
connectdb();
|
|
40
|
+
} );
|
|
41
|
+
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-client",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "client",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "app.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start": "nodemon --exec \"eslint --fix . && node
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node app.js\""
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=18.10.0"
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"mongodb": "^6.3.0",
|
|
26
26
|
"nodemon": "^3.0.3",
|
|
27
27
|
"swagger-ui-express": "^5.0.0",
|
|
28
|
-
"tango-api-schema": "^2.0.
|
|
29
|
-
"tango-app-api-middleware": "^3.1.
|
|
28
|
+
"tango-api-schema": "^2.0.91",
|
|
29
|
+
"tango-app-api-middleware": "^3.1.5",
|
|
30
30
|
"winston": "^3.11.0",
|
|
31
31
|
"winston-daily-rotate-file": "^5.0.0"
|
|
32
32
|
},
|
|
@@ -1269,6 +1269,8 @@ export async function detailedClientCount( req, res ) {
|
|
|
1269
1269
|
|
|
1270
1270
|
if ( isLogoExist ) {
|
|
1271
1271
|
const signedFilUrl = await signedUrl( { Bucket: appConfig.cloud.aws.bucket.assets, file_path: `${client.clientId}/logo/${client.profileDetails?.logo}` } );
|
|
1272
|
+
logger.info( { signedFilUrl: signedFilUrl, data: 'signedFilUrl' } );
|
|
1273
|
+
|
|
1272
1274
|
result['logo'] = signedFilUrl;
|
|
1273
1275
|
} else {
|
|
1274
1276
|
result['logo'] = '';
|