Produced by Araxis Merge on 4/2/2019 1:08:02 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\ARS_Frontend\ars-app | server-qa.js | Wed Mar 27 18:59:48 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Frontend\ars-app | server-qa.js | Fri Mar 29 18:38:07 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 178 |
Changed | 1 | 4 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | const expr ess = requ ire('expre ss'); | |
2 | const path = require ('path'); | |
3 | const http = require ('http'); | |
4 | const http s = requir e('https') ; | |
5 | const fs = require(' fs'); | |
6 | const body Parser = r equire('bo dy-parser' ); | |
7 | const cook ieParser = require(' cookie-par ser'); | |
8 | const app = express( ); | |
9 | ||
10 | // Added t o read the endPointU RI from th e properti es file | |
11 | const dote nv = requi re('dotenv ').config( ); | |
12 | // Change! !! | |
13 | app.use(bo dyParser.j son()); | |
14 | app.use( | |
15 | bodyPars er.urlenco ded({ | |
16 | extend ed: false | |
17 | }) | |
18 | ); | |
19 | app.use(co okieParser ()); | |
20 | app.use(ex press.stat ic(path.jo in(__dirna me, './dis t'))); | |
21 | // Below i s REST Cac hing fix f or IE11 | |
22 | const orig inMiddlewa re = requi re('./ars- app-server /server/au th/originM iddleware' ); | |
23 | app.use(or iginMiddle ware, (req , res, nex t) => { | |
24 | res.set( { | |
25 | 'Acces s-Control- Allow-Orig in': req.a llowedOrig ins, | |
26 | 'Acces s-Control- Allow-Meth ods': 'GET ,POST,PUT, DELETE,OPT IONS', | |
27 | 'Acces s-Control- Allow-Cred entials': true, | |
28 | 'Acces s-Control- Allow-Head ers': 'Aut h, Origin, X-Request ed-With, C ontent-Typ e, Accept' , | |
29 | 'Cache -Control': 'no-cache , no-store , private, must-reva lidate', | |
30 | Expire s: '-1', | |
31 | Pragma : 'no-cach e' | |
32 | }); | |
33 | next(); | |
34 | }); | |
35 | app.disabl e('x-power ed-by') // added due to header vulnerabi lity | |
36 | // at this point all we need i s the logi n route | |
37 | const ewv = require( './ars-app -server/se rver/route s/ewv/ewv' ); | |
38 | const logi n = requir e('./ars-a pp-server/ server/rou tes/login/ login'); | |
39 | const rfai = require ('./ars-ap p-server/s erver/rout es/rfai/rf ai'); | |
40 | const rfai Admin = re quire('./a rs-app-ser ver/server /routes/rf ai/rfaiAdm in'); | |
41 | const sear ch277 = re quire('./a rs-app-ser ver/server /routes/se arch277/se arch277'); | |
42 | const atta chment = r equire('./ ars-app-se rver/serve r/routes/2 75/275Atta chment'); | |
43 | const arsR eports = r equire('./ ars-app-se rver/serve r/routes/r eports/ars Reports'); | |
44 | const user Details = require('. /ars-app-s erver/serv er/routes/ userAdmin/ userAdmin' ); | |
45 | const sso = require( './ars-app -server/se rver/auth/ sso'); | |
46 | const vers ion = requ ire('./ars -app-serve r/server/r outes/vers ion/versio n'); | |
47 | ||
48 | // const d ashboard = require(' ./ars-app- server/ser ver/routes /reports/d ashboard') ; | |
49 | ||
50 | // auth mi ddleware | |
51 | ||
52 | const Auth Middleware = require ('./ars-ap p-server/s erver/auth /authGuard Middleware '); | |
53 | ||
54 | //Configur e the SSL Certificat es receive d from the Certifyin g Authorit y | |
55 | const crt = path.joi n(__dirnam e, 'ssl-ce rts/qa', ' SERVER .crt'); | |
56 | const key = path.joi n(__dirnam e, 'ssl-ce rts/qa', ' SERVER .key'); | |
57 | const http sOptions = { | |
58 | cert: fs .readFileS ync(crt), | |
59 | key: fs. readFileSy nc(key), | |
60 | } | |
61 | ||
62 | app.use('/ login', lo gin); | |
63 | app.use('/ rfai', rfa i); | |
64 | app.use('/ rfaiAdmin' , rfaiAdmi n) | |
65 | app.use('/ ewv', ewv) ; | |
66 | app.use('/ search277' , search27 7); | |
67 | app.use('/ attachment ', attachm ent); | |
68 | app.use('/ arsReports ', arsRepo rts); | |
69 | app.use('/ userDetail s', userDe tails); | |
70 | // app.use ('/dashboa rd', AuthM iddleware, dashboard ); | |
71 | ||
72 | // test co de for sso // | |
73 | app.use('/ sso', sso) ; | |
74 | app.use('/ version', version); | |
75 | ||
76 | // end of test code // | |
77 | ||
78 | ||
79 | const port = process .env.PORT || '3004'; | |
80 | app.set('p ort', port ); | |
81 | ||
82 | app.get('* ', (req, r es) => { | |
83 | res.send File(path. join(__dir name, './d ist/index. html')); | |
84 | }); | |
85 | ||
86 | https.crea teServer(h ttpsOption s, app).li sten(port, function () { | |
87 | console. log( | |
88 | 'API r unning on port ' + p ort + ' - Using endp oint ' + | |
89 | proces s.env.END_ POINT_BASE _URI | |
90 | ) | |
91 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.