tango-app-api-audit 3.4.68-beta.6 → 3.4.68-beta.7
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/package.json +3 -3
- package/app.js +0 -47
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-audit",
|
|
3
|
-
"version": "3.4.68-beta.
|
|
3
|
+
"version": "3.4.68-beta.7",
|
|
4
4
|
"description": "audit & audit metrics apis",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start": "nodemon --exec \"eslint --fix . && node
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node index.js\""
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=18.10.0"
|
package/app.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import dotenv from 'dotenv';
|
|
3
|
-
import { logger } from 'tango-app-api-middleware';
|
|
4
|
-
import { connectdb } from './config/database/database.js';
|
|
5
|
-
import responseMiddleware from './config/response/response.js';
|
|
6
|
-
import errorMiddleware from './config/response/error.js';
|
|
7
|
-
import pkg from 'body-parser';
|
|
8
|
-
import { swaggerConfig } from './config/swagger/swagger.js';
|
|
9
|
-
import swagger from 'swagger-ui-express';
|
|
10
|
-
import traxAuditRouter from './src/routes/traxAudit.routes.js';
|
|
11
|
-
import auditWalletRouter from './src/routes/auditWallet.routes.js';
|
|
12
|
-
import auditRouter from './src/routes/audit.routes.js';
|
|
13
|
-
import cors from 'cors';
|
|
14
|
-
import eyeTestAuditRouter from './src/routes/eyeTestAudit.routes.js';
|
|
15
|
-
|
|
16
|
-
const { json, urlencoded } = pkg;
|
|
17
|
-
const env=dotenv.config();
|
|
18
|
-
|
|
19
|
-
const app = express();
|
|
20
|
-
const PORT = process.env.PORT || 3000;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
app.use( json( { limit: '500mb' } ) );
|
|
24
|
-
app.use(
|
|
25
|
-
urlencoded( {
|
|
26
|
-
extended: true,
|
|
27
|
-
} ),
|
|
28
|
-
);
|
|
29
|
-
app.use( cors() );
|
|
30
|
-
app.use( responseMiddleware );
|
|
31
|
-
app.use( errorMiddleware );
|
|
32
|
-
|
|
33
|
-
if ( env.error ) {
|
|
34
|
-
logger.error( '.env not found' );
|
|
35
|
-
process.exit( 1 );
|
|
36
|
-
}
|
|
37
|
-
app.use( '/api-docs', swagger.serve, swagger.setup( swaggerConfig ) );
|
|
38
|
-
|
|
39
|
-
app.use( '/v3/audit', auditRouter );
|
|
40
|
-
app.use( '/v3/trax-audit', traxAuditRouter );
|
|
41
|
-
app.use( '/v3/audit-wallet', auditWalletRouter );
|
|
42
|
-
app.use( '/v3/eye-test-audit', eyeTestAuditRouter );
|
|
43
|
-
|
|
44
|
-
app.listen( PORT, () => {
|
|
45
|
-
logger.info( `server is running on port= ${PORT} ` );
|
|
46
|
-
connectdb();
|
|
47
|
-
} );
|