Skip to content

Commit

Permalink
only 1 server
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Spratley committed Dec 1, 2014
1 parent f322fd5 commit af2e8ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 36 deletions.
29 changes: 9 additions & 20 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ colors.setTheme({
error: 'red'
});

/*
/* */
console.log("this is an silly".silly);
console.log("this is an input".input);
console.log("this is an verbose".verbose);
Expand All @@ -31,7 +31,7 @@ colors.setTheme({
console.log("this is an debug".debug);
console.log("this is an error".error);
console.log("this is a warning".warn);
*/


/**
* @TODO - HTTPS Key and Cert
Expand All @@ -41,6 +41,7 @@ colors.setTheme({
var httpsKey = fs.readFileSync('./config/apache.key').toString();
var httpsCert = fs.readFileSync('./config/apache.crt').toString();


/**
* @TODO - Proxy Options
* This object holds options used for creating a proxy server.
Expand All @@ -64,6 +65,8 @@ var options = {
hostncmsOnly: true,
router: {}
};


/**
* @TODO - Externalize configuration for server and proxy, mongodb
*/
Expand Down Expand Up @@ -113,13 +116,14 @@ proxyServer = httpProxy.createServer(options, function (req, res, proxy) {
}
});


//Start the proxy server
proxyServer.listen(options.port);


/**
* Test Email
*/
var email = require("emailjs");
var server = email.server.connect({
user: config.email.username,
Expand All @@ -140,21 +144,6 @@ var message = {
]
};
// send the message and get a callback with an error or details of the message that was sent
//server.send(message, function(err, message) { console.log(err || message); });

// you can continue to send more messages with successive calls to 'server.send',
// they will be queued on the same smtp connection

// or you can create a new server connection with 'email.server.connect'
// to asynchronously send individual emails instead of a queue

/*
* fs.readFile(req.files.displayImage.path, function (err, data) {
// ...
var newPath = __dirname + "/uploads/uploadedFileName";
fs.writeFile(newPath, data, function (err) {
res.redirect("back");
});
});*/
server.send(message, function(err, message) { console.log(err || message); });
*/
16 changes: 0 additions & 16 deletions web.js

This file was deleted.

0 comments on commit af2e8ba

Please sign in to comment.