#Simple MongoDB Security Tutorial
###1 - Start mongod without any "security option"
$ mongod --port 27017
#Simple MongoDB Security Tutorial
###1 - Start mongod without any "security option"
$ mongod --port 27017
| #!/usr/bin/env python | |
| # | |
| # Downloader for Google Web Fonts | |
| # | |
| # For usage information run with "--help" | |
| # | |
| # Works on Python 2.6 and later, 3 and later | |
| # Requires tinycss (and argparse for Python 2.6) from pip | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy |
| // set-up a connection between the client and the server | |
| var socket = io.connect(); | |
| // let's assume that the client page, once rendered, knows what room it wants to join | |
| var room = "abc123"; | |
| socket.on('connect', function() { | |
| // Connected, let's sign-up for to receive messages for this room | |
| socket.emit('room', room); | |
| }); |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096 |
Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.
I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt| { | |
| "name": "securehelloworld", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "server.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC", |
###Prerequesites
Install flightplan globally
npm install -g flightplan
Install flightplan in your project folder
| sudo apt-get install nodejs npm | |
| // Ensuite pour que nodemon puisse marcher fo faire | |
| // Car Ubuntu package nodejs provide a binary as a /usr/bin/nodejs, | |
| / not a /usr/bin/node, so most of cli tools can't find it. To solve the problem you need to make a symlink: | |
| sudo ln -sT /usr/bin/nodejs /usr/bin/node | |
| // si turencontre une erreur de type : | |
| SyntaxError: Unexpected token | |
| Redemarre le PC tout simplement | |
| ----------------PUG (old JADE)-------------- |