Skip to content

Commit

Permalink
do not depend on CDN, use local files for angular, jquery and bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
lacksfish committed Mar 15, 2022
1 parent e50280f commit d65dce5
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 29 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/angular.min.js"></script>
<link href="./css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="./js/bootstrap.min.js"></script>
<link href="index.css" rel="stylesheet" id="inline-css">
<!------ Include the above in your HEAD tag ---------->

Expand Down
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const bodyParser = require('body-parser');
const cors = require('cors');
const swaggerUI = require('swagger-ui-express');
const fileUpload = require('express-fileupload');
const path = require('path');

const swaggerDocument = require('./swagger'); //Swagger
const soapservice = require('./soapserver/dvwsuserservice'); //SOAP Service
Expand All @@ -23,6 +24,11 @@ const stage = require('./config')[environment];
const routes = require('./routes/index.js');

app.use(express.static('public'));
app.use("/css", express.static(path.join(__dirname, "node_modules/bootstrap/dist/css")));
app.use("/js", express.static(path.join(__dirname, "node_modules/bootstrap/dist/js")));
app.use("/js", express.static(path.join(__dirname, "node_modules/jquery/dist")));
app.use("/js", express.static(path.join(__dirname, "node_modules/angular")));

app.use(bodyParser.urlencoded({ extended: true }));
app.use('/api-docs', swaggerUI.serve, swaggerUI.setup(swaggerDocument));
app.use('/dvwsuserservice', soapservice);
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"homepage": "https://github.com/snoopysecurity/dvws-node#readme",
"dependencies": {
"@graphql-tools/schema": "^8.3.1",
"angular": "1.3.9",
"apollo-server": "^3.5.0",
"bcrypt": "^3.0.1",
"body-parser": "^1.18.3",
"bootstrap": "4.0.0",
"cors": "^2.8.5",
"dotenv": "^6.0.0",
"express": "^4.16.3",
Expand All @@ -32,6 +34,7 @@
"graphql-tools": "^8.2.0",
"http-proxy-middleware": "^1.0.3",
"install": "^0.13.0",
"jquery": "1.11.1",
"jsonwebtoken": "^8.3.0",
"libxmljs": "^0.19.7",
"mongoose": "^5.10.15",
Expand Down
8 changes: 4 additions & 4 deletions public/home.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/angular.min.js"></script>
<link href="./css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="./js/bootstrap.min.js"></script>
<link href="index.css" rel="stylesheet" id="inline-css">
<!------ Include the above in your HEAD tag ---------->

Expand Down
8 changes: 4 additions & 4 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/angular.min.js"></script>
<link href="./css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="./js/bootstrap.min.js"></script>
<link href="index.css" rel="stylesheet" id="inline-css">
<!------ Include the above in your HEAD tag ---------->

Expand Down
8 changes: 4 additions & 4 deletions public/notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<html>

<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/angular.min.js"></script>
<link href="./css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="./js/bootstrap.min.js"></script>
<link href="index.css" rel="stylesheet" id="inline-css">
<!------ Include the above in your HEAD tag ---------->

Expand Down
8 changes: 4 additions & 4 deletions public/passphrasegen.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<html>

<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/angular.min.js"></script>
<link href="./css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="./js/bootstrap.min.js"></script>
<link href="index.css" rel="stylesheet" id="inline-css">
<script type="text/javascript" src="passgen.js"></script>
<!------ Include the above in your HEAD tag ---------->
Expand Down
8 changes: 4 additions & 4 deletions public/search.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/angular.min.js"></script>
<link href="./css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="./js/bootstrap.min.js"></script>
<link href="index.css" rel="stylesheet" id="inline-css">
<!------ Include the above in your HEAD tag ---------->

Expand Down
Loading

0 comments on commit d65dce5

Please sign in to comment.