diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..b5fc5db --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ + TYPEDB = + +DB = + +USERDB = + +PASSDB = + +HOSTDB = + +PORT = diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1dcef2d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +.env \ No newline at end of file diff --git a/app.js b/app.js index d009e61..98b9569 100644 --- a/app.js +++ b/app.js @@ -4,10 +4,11 @@ var cors = require('cors'); app.get('/', function(req, res) { res.send('Hello World!'); }); +require('dotenv').config() app.use(cors()); app.use(express.json()) // for parsing application/json app.use(express.urlencoded({ extended: true })) app.use(require('./routes/index.js')) -app.listen(3000, function() { - console.log('Example app listening on port 3000!'); +app.listen(process.env.PORT, function() { + console.log('Example app listening on port ' + process.env.PORT + '!'); }); \ No newline at end of file diff --git a/conf/connection.js b/conf/connection.js index 90ba706..4aa4042 100644 --- a/conf/connection.js +++ b/conf/connection.js @@ -1,9 +1,9 @@ var mysql = require('mysql'); var connection = mysql.createConnection({ - host: 'localhost', - user: 'root', - password: 'george', - database: 'coloquio_educacion' + host: process.env.HOSTDB, + user: process.env.USERDB, + password: process.env.PASSDB, + database: process.env.DB }); module.exports = connection; \ No newline at end of file diff --git a/files/cartel-1.docx b/files/cartel-1.docx index 8ee6603..65e5006 100644 Binary files a/files/cartel-1.docx and b/files/cartel-1.docx differ diff --git a/files/ponencia-1.docx b/files/ponencia-1.docx index 8ee6603..65e5006 100644 Binary files a/files/ponencia-1.docx and b/files/ponencia-1.docx differ diff --git a/files/cartel-10.docx b/files/ponencia-11.docx similarity index 100% rename from files/cartel-10.docx rename to files/ponencia-11.docx diff --git a/files/ponencia-10.docx b/files/ponencia-12.docx similarity index 100% rename from files/ponencia-10.docx rename to files/ponencia-12.docx diff --git a/files/ponencia-2.docx b/files/ponencia-2.docx deleted file mode 100644 index dbb2a1d..0000000 Binary files a/files/ponencia-2.docx and /dev/null differ diff --git a/files/ponencia-5.docx b/files/ponencia-5.docx deleted file mode 100644 index dbb2a1d..0000000 Binary files a/files/ponencia-5.docx and /dev/null differ diff --git a/package-lock.json b/package-lock.json index ba3aecc..4b60f08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -241,6 +241,11 @@ "libmime": "^2.0.3" } }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", diff --git a/package.json b/package.json index fd78a40..fa7287a 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "dependencies": { "bcrypt": "^3.0.8", "cors": "^2.8.5", + "dotenv": "^8.2.0", "express": "^4.17.1", "express-fileupload": "^1.1.6", "randomstring": "^1.1.5",