diff --git a/web/app.js b/web/app.js index fb04a9a..e839bec 100755 --- a/web/app.js +++ b/web/app.js @@ -11,6 +11,7 @@ var createError = require('http-errors'), var indexRouter = require('./routes/index'); var enTranslations = require("./locales/en.json"); var elTranslations = require("./locales/el.json"); +var config = require("./config/creds.js"); var app = express(); @@ -49,7 +50,7 @@ app.use( cookie: { maxAge: 60000 }, - secret: "secret", + secret: config.sessionSecret, resave: false, saveUninitialized: false }) diff --git a/web/bin/www b/web/bin/www index 8debe8a..0b2e956 100755 --- a/web/bin/www +++ b/web/bin/www @@ -12,7 +12,7 @@ var http = require('http'); * Get port from environment and store in Express. */ -var port = normalizePort(process.env.PORT || '3000'); +var port = normalizePort('3000'); //Fixed port for docker app.set('port', port); /** @@ -58,9 +58,9 @@ function onError(error) { throw error; } - var bind = typeof port === 'string' - ? 'Pipe ' + port - : 'Port ' + port; + var bind = typeof port === 'string' ? + 'Pipe ' + port : + 'Port ' + port; // handle specific listen errors with friendly messages switch (error.code) { @@ -83,8 +83,8 @@ function onError(error) { function onListening() { var addr = server.address(); - var bind = typeof addr === 'string' - ? 'pipe ' + addr - : 'port ' + addr.port; + var bind = typeof addr === 'string' ? + 'pipe ' + addr : + 'port ' + addr.port; debug('Listening on ' + bind); -} +} \ No newline at end of file diff --git a/web/config/creds.js b/web/config/creds.js index e69de29..7804d24 100644 --- a/web/config/creds.js +++ b/web/config/creds.js @@ -0,0 +1,3 @@ +module.exports = { + sessionSecret: "mySecretKey" +}; \ No newline at end of file diff --git a/web/dockerfile b/web/dockerfile index 8506b70..8edf38d 100644 --- a/web/dockerfile +++ b/web/dockerfile @@ -15,5 +15,5 @@ RUN npm install # Bundle app source COPY . . -EXPOSE 8080 +EXPOSE 3000 CMD [ "node", "./bin/www" ] \ No newline at end of file diff --git a/web/locales/en.json b/web/locales/en.json index f861315..5633bd2 100644 --- a/web/locales/en.json +++ b/web/locales/en.json @@ -34,7 +34,7 @@ "node_text4": "Learn How to providing a bi-directional communication channel between a client and a server.", "python_header": "Python, scipy", "python_text": "This Labroom provides a Python-based ecosystem of open-source software for mathematics, science, engineering and Web development", - "doc-text-01": "", + "doc-text-02": "The Swarmlabs platform", "doc-text-03": "The Main page", "doc-text-04": "My lab", diff --git a/web/package.json b/web/package.json index 14c8629..7265968 100755 --- a/web/package.json +++ b/web/package.json @@ -19,4 +19,4 @@ "morgan": "~1.9.1", "nodemon": "^2.0.4" } -} +} \ No newline at end of file diff --git a/web/public/images/undraw_online_reading_np7n.svg b/web/public/images/undraw_online_reading_np7n.svg new file mode 100644 index 0000000..b43b8ae --- /dev/null +++ b/web/public/images/undraw_online_reading_np7n.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/views/documentation.ejs b/web/views/documentation.ejs index eedb5e6..a3db0b5 100644 --- a/web/views/documentation.ejs +++ b/web/views/documentation.ejs @@ -2,7 +2,7 @@
-