-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndex.js
More file actions
24 lines (18 loc) · 757 Bytes
/
Index.js
File metadata and controls
24 lines (18 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
console.log("Intern")
var express = require('express');
var app = express();
var http = require("http");
http.createServer(function (request, response) {
// Send the HTTP header
// HTTP Status: 200 : OK
// Content Type: text/plain
response.writeHead(200, {'Content-Type': 'text/plain'});
// Send the response body as "Hello World"
//response.json({ fulfillmentText: 'This is a sample response from your webhook!' });
response.end('Hello World\n');
}).listen(process.env.port);
// Console will print the message
//console.log('Server running at http://127.0.0.1:8081/');
module.exports.helloHttp = function helloHttp (request, response) {
response.json({ fulfillmentText: 'This is a sample response from your webhook!' });
};