tango-app-api-client 3.3.3-beta.12 → 3.3.3-beta.13
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 -40
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-client",
|
|
3
|
-
"version": "3.3.3-beta.
|
|
3
|
+
"version": "3.3.3-beta.13",
|
|
4
4
|
"description": "client",
|
|
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,40 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import { clientRouter } from './index.js';
|
|
3
|
-
|
|
4
|
-
import dotenv from 'dotenv';
|
|
5
|
-
import { logger } from 'tango-app-api-middleware';
|
|
6
|
-
import { connectdb } from './config/database/database.js';
|
|
7
|
-
import responseMiddleware from './config/response/response.js';
|
|
8
|
-
import errorMiddleware from './config/response/error.js';
|
|
9
|
-
import pkg from 'body-parser';
|
|
10
|
-
import { swaggerConfig } from './config/swagger/swagger.js';
|
|
11
|
-
import swagger from 'swagger-ui-express';
|
|
12
|
-
|
|
13
|
-
const { json, urlencoded } = pkg;
|
|
14
|
-
const env=dotenv.config();
|
|
15
|
-
|
|
16
|
-
const app = express();
|
|
17
|
-
const PORT = process.env.PORT || 3000;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
app.use( json( { limit: '500mb' } ) );
|
|
21
|
-
app.use(
|
|
22
|
-
urlencoded( {
|
|
23
|
-
extended: true,
|
|
24
|
-
} ),
|
|
25
|
-
);
|
|
26
|
-
app.use( responseMiddleware );
|
|
27
|
-
app.use( errorMiddleware );
|
|
28
|
-
|
|
29
|
-
if ( env.error ) {
|
|
30
|
-
logger.error( '.env not found' );
|
|
31
|
-
process.exit( 1 );
|
|
32
|
-
}
|
|
33
|
-
app.use( '/api-docs', swagger.serve, swagger.setup( swaggerConfig ) );
|
|
34
|
-
|
|
35
|
-
app.use( '/v3/client', clientRouter );
|
|
36
|
-
|
|
37
|
-
app.listen( PORT, () => {
|
|
38
|
-
logger.info( `server is running on port= ${PORT} ` );
|
|
39
|
-
connectdb();
|
|
40
|
-
} );
|