...
Code Block | ||
---|---|---|
| ||
// Load Profound.js
var profoundjs = require("./index.js");
// Apply configuration
var config = require("./config.js");
profoundjs.applyConfig(config);
// Setup a custom alias under the web server that outputs some content
profoundjs.server.app.get('/mycustomalias', function(req, res) {
res.send('My Custom Content');
});
// Start Profound.js server
profoundjs.server.listen();
console.log('Profound.js server running at http://%s:%d/', config.host, config.port);
|