NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


/**
* Module dependencies.
*/

var express = require('express')
//var routes = require('./routes')
//var user = require('./routes/user')
var http = require('http')
var https = require('https')
var path = require('path');
var logger = require('morgan');
var session = require('express-session');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var multer = require('multer');
var upload = multer({
dest : 'uploads/'
});
var errorHandler = require('errorhandler');
var app = express();
var mongoose = require('mongoose');
var passport = require('passport');
var flash = require('connect-flash');
var path = require('path');
var MongoClient = require('mongodb').MongoClient;
var asser = require('assert');
var fs = require('fs');
var os = require('os');
var child;
var exec = require('child_process').exec;
var nodemailer = require('nodemailer');

var configDB = require('./config/database.js');

//load certificate

var privateKey = fs.readFileSync('sslcert/server.key', 'utf8');
var certificate = fs.readFileSync('sslcert/server.crt', 'utf8');

var credentials = {key: privateKey, cert: certificate};

// all environments
mongoose.connect(configDB.url);
require('./config/passport')(passport);

app.set('port', process.env.PORT || 3000);
app.set('ports', process.env.PORT || 3001);
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
//app.use(favicon());
//app.use(express.logger('dev'));
app.use(bodyParser());
//app.use(methodOverride());
//app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

app.use(logger('dev')); // log every request to the console
app.use(cookieParser()); // read cookies (needed for auth)
app.use(session({
secret : 'jdkfLKJkf8*(ijlksd89..>>,.,*&*djlk*&98uida',
cookie : {
maxAge : 30 * 60 * 1000
}
})); // session secret
app.use(passport.initialize());
app.use(passport.session()); // persistent login sessions
app.use(flash()); // use connect-flash for flash messages stored in session

//setup mongoose
app.db = mongoose.createConnection(configDB.url);
app.db.on('error', console.error.bind(console, 'mongoose connection error: '));
app.db.once('open', function () {
//and... we have a data store
});

//config data models
//require('./app/models')(app, mongoose);


var smtpConfig = {
host: 'smtp.gmail.com',
port: 465,
secure: true, // use SSL
auth: {
user: '[email protected]',
pass: '12Test123'
}
};
var transporter = nodemailer.createTransport(smtpConfig);
app.utility = {
workflow : require('./util/workflow/workflow.js'),
nodemailer : require('nodemailer'),
transporter : transporter
};

var mailOptions = {
from: '"Safecontrol License web" <[email protected]>',
to: '[email protected], [email protected]',
subject: 'Server starting',
text: 'Server starting.'
};
/*transporter.sendMail(mailOptions, function(error, info) {
if(error) console.log(error)
else console.log("Mail succesfully sended");
})*/

//config data models
//require('./app/models.js')(app, mongoose);

// development only



//routes ======================================================================
require('./app/routes.js')(app, passport); // load our routes and pass in our
// app and fully configured passport
//launch ======================================================================


http.createServer(app).listen(app.get('port'), function(){
console.log('Express http server listening on port ' + app.get('port'));
});

https.createServer(credentials, app).listen(app.get('ports'), function(){
console.log('Express https server listening on port ' + app.get('ports'));
});
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.