-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
27 lines (21 loc) · 692 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var express = require('express');
var app = express();
var exports = module.exports = {};
var versionNumber = "0.0.1"
var content = ""
function welcomeMessage(){
var message = "Welcome to CI/CD 101 using CircleCI!";
return message;
}
content = welcomeMessage() + "\n Version Number: " + versionNumber
// set the view engine to ejs
app.set('view engine', 'ejs');
app.get('/', function (req, res) {
// var message = "Hello World";
res.render("index", {message: content});
});
var server = app.listen(5000, function () {
console.log("Node server is running on port: "+ server.address().port);
});
module.exports = server;
module.exports.welcomeMessage = welcomeMessage;