This is my app config codes:
'use strict';
/* Import all nedeed packages and exported modules */
var express = require('express')
, bodyParser = require('body-parser')
, session = require('express-session')
, jsonwebtoken = require('jsonwebtoken')
, mongoose = require('mongoose')
, moment = require('moment')
, os = require('os')
, compression = require('compression')
, config = require('./config.js')
, fs = require('fs');
var app = express();
/* Session config */
app.use(session({
secret: config.secureHasherKey ,
resave: false,
saveUninitialized: true
}));
var baseUrl = config.url + ':' + config.port;
/* Mongodb connection by mongoose module */
mongoose.Promise = global.Promise;
mongoose.connect(config.dbhost + config.dbname, function(err){
if(err){
console.log(err);
} else {
console.log('connected to the database successfuly.');
}
});
I have a MEAN stack application and it works perfectly and I have a page
for adding posts ajaxly by angular 1.5. My problem is my application
crashes after adding some posts fastly!! why?
Picture of my project proccesses on my Ubuntu VPS in 10 seconds:
<https://i.stack.imgur.com/XsrZc.png>
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/331ea0ac-6a93-4335-8186-a4df24f38d23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.