Re work
This commit is contained in:
parent
9ce01dcf5f
commit
f0187f14f9
4
app.js
4
app.js
@ -7,13 +7,15 @@ const config = require('./config');
|
||||
const base58 = require('./base58.js');
|
||||
const log4js = require('log4js');
|
||||
const logger = log4js.getLogger();
|
||||
const compression = require('compression');
|
||||
|
||||
logger.level = 'debug';
|
||||
|
||||
// grab the url model
|
||||
const Url = require('./models/url');
|
||||
|
||||
mongoose.connect('mongodb://' + config.db.host + '/' + config.db.name);
|
||||
|
||||
app.use(compression());
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
|
||||
|
45
package-lock.json
generated
45
package-lock.json
generated
@ -960,6 +960,43 @@
|
||||
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==",
|
||||
"dev": true
|
||||
},
|
||||
"compressible": {
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.11.tgz",
|
||||
"integrity": "sha1-FnGKdd4oPtjmBAQWJaIGRYZ5fYo=",
|
||||
"requires": {
|
||||
"mime-db": "1.29.0"
|
||||
}
|
||||
},
|
||||
"compression": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/compression/-/compression-1.7.0.tgz",
|
||||
"integrity": "sha1-AwyfGY8WQ6BX13anOOki2kNzAS0=",
|
||||
"requires": {
|
||||
"accepts": "1.3.3",
|
||||
"bytes": "2.5.0",
|
||||
"compressible": "2.0.11",
|
||||
"debug": "2.6.8",
|
||||
"on-headers": "1.0.1",
|
||||
"safe-buffer": "5.1.1",
|
||||
"vary": "1.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bytes": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-2.5.0.tgz",
|
||||
"integrity": "sha1-TJQj6i0lLCcMQbK97+/5u2tiwGo="
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.6.8",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
|
||||
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@ -5604,6 +5641,11 @@
|
||||
"ee-first": "1.1.1"
|
||||
}
|
||||
},
|
||||
"on-headers": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
|
||||
"integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
@ -6786,8 +6828,7 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
|
||||
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
|
||||
},
|
||||
"sass-graph": {
|
||||
"version": "2.2.4",
|
||||
|
@ -10,6 +10,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.14.1",
|
||||
"compression": "^1.7.0",
|
||||
"express": "^4.13.3",
|
||||
"mongoose": "4.2.9"
|
||||
},
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
<title>nURL</title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
|
||||
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">-->
|
||||
<link rel="stylesheet" href="//cdn.muicss.com/mui-0.9.20/css/mui.min.css">
|
||||
<link href="css/styles.css" rel="stylesheet">
|
||||
</head>
|
||||
@ -29,42 +28,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="site-wrapper">
|
||||
|
||||
<div class="site-wrapper-inner">
|
||||
|
||||
<div class="main-container">
|
||||
|
||||
<div class="inner cover">
|
||||
<span class="glyphicon glyphicon-link"></span>
|
||||
<h1>nURL</h1>
|
||||
<h4>nurl.co</h4>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="input-group input-group-lg">
|
||||
<input id="url-field" type="text" class="form-control" placeholder="Paste a link...">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-shorten" type="button">SHORTEN</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div id="link"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>-->
|
||||
|
||||
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
<script src="javascripts/shorten.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user