Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
explorviz-downloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ExplorViz
explorviz-github-archive
explorviz-downloader
Commits
a7d7a478
Commit
a7d7a478
authored
7 years ago
by
Josefine Wegert
Browse files
Options
Downloads
Patches
Plain Diff
refactoring and if for frontend/backend check added
parent
14878da2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.js
+22
-17
22 additions, 17 deletions
app.js
with
22 additions
and
17 deletions
app.js
+
22
−
17
View file @
a7d7a478
var
express
=
require
(
'
express
'
);
var
bodyParser
=
require
(
'
body-parser
'
);
const
express
=
require
(
'
express
'
);
const
bodyParser
=
require
(
'
body-parser
'
);
var
exec
=
require
(
'
child_process
'
).
exec
;
var
execSync
=
require
(
'
child_process
'
).
execSync
;
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
var
fsReaddir
=
require
(
'
fs-readdir
'
);
var
JSZip
=
require
(
'
jszip
'
);
const
exec
=
require
(
'
child_process
'
).
exec
;
const
execSync
=
require
(
'
child_process
'
).
execSync
;
const
fs
=
require
(
'
fs
'
);
const
path
=
require
(
'
path
'
);
const
fsReaddir
=
require
(
'
fs-readdir
'
);
const
JSZip
=
require
(
'
jszip
'
);
var
exphbs
=
require
(
'
express-handlebars
'
);
const
exphbs
=
require
(
'
express-handlebars
'
);
// global.jQuery = require('jquery');
// const bootstrap = require('bootstrap');
//initializer
var
initGitRepos
=
require
(
'
./initializers/gitRepos.js
'
);
const
initGitRepos
=
require
(
'
./initializers/gitRepos.js
'
);
//load names of available download files
const
downloadFiles
=
require
(
'
./downloadFiles.json
'
);
const
downloadNames
=
Object
.
keys
(
downloadFiles
);
//load functions for frontend and backend build
le
t
backendFunctions
=
require
(
'
./backendFunctions.js
'
);
le
t
frontendFunctions
=
require
(
'
./frontendFunctions.js
'
);
le
t
zipFunctions
=
require
(
'
./zipFunctions.js
'
);
cons
t
backendFunctions
=
require
(
'
./backendFunctions.js
'
);
cons
t
frontendFunctions
=
require
(
'
./frontendFunctions.js
'
);
cons
t
zipFunctions
=
require
(
'
./zipFunctions.js
'
);
var
app
=
express
();
const
app
=
express
();
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
true
...
...
@@ -66,6 +66,13 @@ app.use(bodyParser.json());
backendChecked
=
checkedFiles
.
find
(
function
(
file
){
return
file
===
'
explorviz-ui-backend
'
;
});
frontendChecked
=
checkedFiles
.
find
(
function
(
file
){
return
file
===
'
explorviz-ui-frontend
'
;
});
if
(
!
(
backendChecked
||
frontendChecked
)){
res
.
render
(
'
home
'
,
{
downloadFiles
:
downloadNames
});
}
if
(
backendChecked
){
...
...
@@ -92,9 +99,7 @@ app.use(bodyParser.json());
}
frontendChecked
=
checkedFiles
.
find
(
function
(
file
){
return
file
===
'
explorviz-ui-frontend
'
;
});
if
(
frontendChecked
){
const
fileName
=
frontendChecked
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment