-
Notifications
You must be signed in to change notification settings - Fork 7
/
app.js
51 lines (39 loc) · 1.72 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// # Main App
/*
Ejecutable principal de transparente.ugr.es
*/
"use strict";
/*UGR Transparente. Sitio Web de la Universidad de Granada de acceso a Datos Abiertos.
Copyright (C) 2014 Jaime Torres Benavente, Óscar Zafra Megías
Copyright (C) 2015 Mario Heredia Moreno, Germán Martínez Maldonado
Copyright (C) 2016 Andrés Ortiz Corrales
This file is part of UGR Transparente.
UGR Transparente is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
UGR Transparente is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.*/
// ### Dependencias
// * **Express:** Framework web
var express = require('express');
var app = express();
// #### Dependencias Locales
// * [**Server Config**](./serverConfig.html): Configuración del servidor
var serverConfig = require('./app/serverConfig');
// * [**Routes**](./routes.html): Rutas del servidor
var routes = require('./app/routes');
serverConfig(app);
routes(app);
// Se levanta la aplicación en el puerto e ip determinados
var server = app.listen(app.get('port'), app.get('ip'), function() {
console.log("UGR - Transparente " + process.env.npm_package_version);
console.log('Express server listening on ' + app.get('ip') + ':' + app.get('port'));
});
// ###Exports
// * server: servidor express en escucha
module.exports = server;