Hello I am Dionisis Efsthopoulos from Greece Athens. This is my First attempt on node js - express -mongodb
links
https://www.terlici.com/2014/08/25/best-practices-express-structure.html
https://www.terlici.com/2014/09/29/express-router.html
https://techprd.com/how-to-develop-a-responsive-node-js-express-website-using-bootstrap/
https://scotch.io/tutorials/easy-node-authentication-setup-and-local
https://www.danielgynn.com/build-an-authentication-app-using-express-node-passport/
https://www.youtube.com/watch?v=07739ffJkbo
https://scotch.io/tutorials/using-mongoosejs-in-node-js-and-mongodb-applications
http://devsmash.com/blog/password-authentication-with-mongoose-and-bcrypt
https://stormpath.com/blog/everything-you-ever-wanted-to-know-about-node-dot-js-sessions
http://sahatyalkabov.com/how-to-implement-password-reset-in-nodejs/
https://mostafa-samir.github.io/async-iterative-patterns-pt1/
https://stackoverflow.com/questions/4288759/asynchronous-for-cycle-in-javascript
https://eddywashere.com/blog/switching-out-callbacks-with-promises-in-mongoose/
https://medium.com/google-cloud/node-to-google-cloud-compute-engine-in-25-minutes-7188830d884e
https://github.com/chriso/validator.js#validators
https://www.youtube.com/watch?v=7k03jobKGXM
https://docs.mongodb.com/getting-started/shell/
The certificate files are stored inside the ssl/ folder. You can generate new files with the following commands.
Create the private key :
openssl genrsa -out key.pem 1024 Create the "Certificate Signing Request" :
openssl req -new -key key.pem -out csr.pem Create the self-signed certificate :
openssl x509 -req -in csr.pem -signkey key.pem -out cert.pem Alternatively you can send the CSR to a Certificate Authority for signing.
https://slproweb.com/products/Win32OpenSSL.html download for windows
https://www.youtube.com/watch?v=H8GxM9ApkYc setup openssl for windows
ssl nodejs express socket.io
var fs = require( 'fs' );
var app = require('express')();
var https = require('https');
var server = https.createServer({
key: fs.readFileSync('./test_key.key'),
cert: fs.readFileSync('./test_cert.crt'),
ca: fs.readFileSync('./test_ca.crt'),
requestCert: false,
rejectUnauthorized: false
},app);
server.listen(8080);
var io = require('socket.io').listen(server);
io.sockets.on('connection',function (socket) {
...
});
app.get("/", function(request, response){
...
})
https://www.sitepoint.com/configuring-nginx-ssl-node-js/
controllers/ – defines your app routes and their logic
helpers/ – code and functionality to be shared by different parts of the project
middlewares/ – Express middlewares which process the incoming requests before handling them down to the routes
models/ – represents data, implements business logic and handles storage
public/ – contains all static files like images, styles and javascript
views/ – provides templates which are rendered and served by your routes
tests/ – tests everything which is in the other folders
app.js – initializes the app and glues everything together
package.json – remembers all packages that your app depends on and their versions